Skip to content

Commit 8a1c678

Browse files
committed
chore: fix tests
1 parent 2c201c1 commit 8a1c678

File tree

3 files changed

+6
-20
lines changed

3 files changed

+6
-20
lines changed

src/mount.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export function mount<
150150
Extends,
151151
EE
152152
>,
153-
options?: MountingOptions<PublicProps, D>
153+
options?: MountingOptions<Props & PublicProps, D>
154154
): VueWrapper<
155155
ComponentPublicInstance<Props, RawBindings, D, C, M, E, VNodeProps & Props>
156156
>

test-dts/mount.d-test.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,9 @@ const AppWithoutProps = {
120120
template: ''
121121
}
122122

123-
// can't receive extra props
124-
expectError(
125-
mount(AppWithoutProps, {
126-
props: { b: 'Hello' }
127-
})
128-
)
129-
130-
// except if explicitly cast
123+
// allow extra props, like using `h()`
131124
mount(AppWithoutProps, {
132-
props: { b: 'Hello' } as never
125+
props: { b: 'Hello' }
133126
})
134127

135128
// Functional tests

test-dts/shallowMount.d-test.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,9 @@ const AppWithoutProps = {
8585
template: ''
8686
}
8787

88-
// can't receive extra props
89-
expectError(
90-
(wrapper = shallowMount(AppWithoutProps, {
91-
props: { b: 'Hello' }
92-
}))
93-
)
94-
95-
// except if explicitly cast
96-
shallowMount(AppWithoutProps, {
97-
props: { b: 'Hello' } as never
88+
// allow extra props, like using `h()`
89+
wrapper = shallowMount(AppWithoutProps, {
90+
props: { b: 'Hello' }
9891
})
9992

10093
// class component

0 commit comments

Comments
 (0)