]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
wip: remove unnecessary tests
authordaiwei <daiwei521@126.com>
Mon, 24 Mar 2025 06:17:52 +0000 (14:17 +0800)
committerdaiwei <daiwei521@126.com>
Mon, 24 Mar 2025 06:17:52 +0000 (14:17 +0800)
packages/runtime-vapor/__tests__/components/Teleport.spec.ts

index 86b1ec62cf1ed2161eb85afd42b5dbc4f11369be..27c1682fa4f3d42669719cf1cc02291c0c3afd3d 100644 (file)
@@ -392,66 +392,6 @@ function runSharedTests(deferMode: boolean): void {
     expect(target.innerHTML).toBe('<div>teleported</div>')
   })
 
-  test.todo('moving teleport while enabled', async () => {
-    const target = document.createElement('div')
-    const root = document.createElement('div')
-
-    const child1 = createComponent(
-      VaporTeleport,
-      { to: () => target },
-      { default: () => template('<div>teleported</div>')() },
-    )
-    const child2 = template('<div>root</div>')()
-
-    const children = shallowRef([child1, child2])
-    const { mount } = define({
-      setup() {
-        return children.value
-      },
-    }).create()
-    mount(root)
-
-    expect(root.innerHTML).toBe('<!--teleport--><div>root</div>')
-    expect(target.innerHTML).toBe('<div>teleported</div>')
-
-    children.value = [child2, child1]
-    await nextTick()
-    expect(root.innerHTML).toBe('<div>root</div><!--teleport-->')
-    expect(target.innerHTML).toBe('<div>teleported</div>')
-  })
-
-  test.todo('moving teleport while disabled', async () => {
-    const target = document.createElement('div')
-    const root = document.createElement('div')
-
-    const child1 = createComponent(
-      VaporTeleport,
-      { to: () => target, disabled: () => true },
-      { default: () => template('<div>teleported</div>')() },
-    )
-    const child2 = template('<div>root</div>')()
-
-    const children = shallowRef([child1, child2])
-    const { mount } = define({
-      setup() {
-        return children.value
-      },
-    }).create()
-    mount(root)
-
-    expect(root.innerHTML).toBe(
-      '<div>teleported</div><!--teleport--><div>root</div>',
-    )
-    expect(target.innerHTML).toBe('')
-
-    children.value = [child2, child1]
-    await nextTick()
-    expect(root.innerHTML).toBe(
-      '<div>root</div><div>teleported</div><!--teleport-->',
-    )
-    expect(target.innerHTML).toBe('')
-  })
-
   test(`the dir hooks of the Teleport's children should be called correctly`, async () => {
     const target = document.createElement('div')
     const root = document.createElement('div')