Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
test('cloneVNode', () => {
const node1 = createVNode('div', { foo: 1 }, null)
expect(cloneVNode(node1)).toEqual(node1)
const node2 = createVNode({}, null, [node1])
const cloned2 = cloneVNode(node2)
expect(cloned2).toEqual(node2)
expect(cloneVNode(node2)).toEqual(node2)
expect(cloneVNode(node2)).toEqual(cloned2)
})
test('cloneVNode', () => {
const node1 = createVNode('div', { foo: 1 }, null)
expect(cloneVNode(node1)).toEqual(node1)
const node2 = createVNode({}, null, [node1])
const cloned2 = cloneVNode(node2)
expect(cloned2).toEqual(node2)
expect(cloneVNode(node2)).toEqual(node2)
expect(cloneVNode(node2)).toEqual(cloned2)
})
test('cloneVNode', () => {
const node1 = createVNode('div', { foo: 1 }, null)
expect(cloneVNode(node1)).toEqual(node1)
const node2 = createVNode({}, null, [node1])
const cloned2 = cloneVNode(node2)
expect(cloned2).toEqual(node2)
expect(cloneVNode(node2)).toEqual(node2)
expect(cloneVNode(node2)).toEqual(cloned2)
})