Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
test('type shapeFlag inference', () => {
expect(createVNode('div').shapeFlag).toBe(ShapeFlags.ELEMENT)
expect(createVNode({}).shapeFlag).toBe(ShapeFlags.STATEFUL_COMPONENT)
expect(createVNode(() => {}).shapeFlag).toBe(
ShapeFlags.FUNCTIONAL_COMPONENT
)
expect(createVNode(Text).shapeFlag).toBe(0)
})