Skip to content

Commit 10c0ba5

Browse files
committed
test: fix dts tests for Teleport renaming
1 parent 8357895 commit 10c0ba5

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

test-dts/h.test-d.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
defineComponent,
66
ref,
77
Fragment,
8-
Portal,
8+
Teleport,
99
Suspense
1010
} from './index'
1111

@@ -32,11 +32,11 @@ describe('h inference w/ Fragment', () => {
3232
expectError(h(Fragment, { key: 123 }, 'bar'))
3333
})
3434

35-
describe('h inference w/ Portal', () => {
36-
h(Portal, { target: '#foo' }, 'hello')
37-
expectError(h(Portal))
38-
expectError(h(Portal, {}))
39-
expectError(h(Portal, { target: '#foo' }))
35+
describe('h inference w/ Teleport', () => {
36+
h(Teleport, { to: '#foo' }, 'hello')
37+
expectError(h(Teleport))
38+
expectError(h(Teleport, {}))
39+
expectError(h(Teleport, { to: '#foo' }))
4040
})
4141

4242
describe('h inference w/ Suspense', () => {

test-dts/tsx.test-d.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// TSX w/ defineComponent is tested in defineComponent.test-d.tsx
22

33
import { expectError, expectType } from 'tsd'
4-
import { KeepAlive, Suspense, Fragment, Portal } from '@vue/runtime-dom'
4+
import { KeepAlive, Suspense, Fragment, Teleport } from '@vue/runtime-dom'
55

66
expectType<JSX.Element>(<div />)
77
expectType<JSX.Element>(<div id="foo" />)
@@ -27,10 +27,10 @@ expectType<JSX.Element>(
2727
expectType<JSX.Element>(<Fragment />)
2828
expectType<JSX.Element>(<Fragment key="1" />)
2929

30-
expectType<JSX.Element>(<Portal target="#foo" />)
31-
expectType<JSX.Element>(<Portal target="#foo" key="1" />)
32-
expectError(<Portal />)
33-
expectError(<Portal target={1} />)
30+
expectType<JSX.Element>(<Teleport to="#foo" />)
31+
expectType<JSX.Element>(<Teleport to="#foo" key="1" />)
32+
expectError(<Teleport />)
33+
expectError(<Teleport to={1} />)
3434

3535
// KeepAlive
3636
expectType<JSX.Element>(<KeepAlive include="foo" exclude={['a']} />)

0 commit comments

Comments
 (0)