Skip to content

Commit

Permalink
chore: update test
Browse files Browse the repository at this point in the history
  • Loading branch information
edison1105 committed Jan 6, 2025
1 parent 034bac0 commit af25c8c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/runtime-core/__tests__/components/Teleport.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,16 +274,14 @@ describe('renderer: teleport', () => {
root,
)
const commentNode = teleport!.children[0].el
expect(serializeInner(root)).toMatchInlineSnapshot(`"<div>0</div>"`)
expect(serializeInner(target)).toMatchInlineSnapshot(
`"<!--comment in teleport-->"`,
)
expect(serializeInner(root)).toBe(`<div>0</div>`)
expect(serializeInner(target)).toBe(`<!--comment in teleport-->`)
expect(serialize(commentNode)).toBe(`<!--comment in teleport-->`)

count.value = 1
await nextTick()
__DEV__ = true
expect(serializeInner(root)).toMatchInlineSnapshot(`"<div>1</div>"`)
expect(serializeInner(root)).toBe(`<div>1</div>`)
expect(teleport!.children[0].el).toBe(commentNode)
})

Expand Down

0 comments on commit af25c8c

Please sign in to comment.