File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ import {
27
27
import { config } from './config'
28
28
import { GlobalMountOptions } from './types'
29
29
import {
30
- isClassComponent ,
31
30
isFunctionalComponent ,
32
31
isObjectComponent ,
33
32
mergeGlobalProperties
@@ -73,9 +72,12 @@ export type ObjectEmitsOptions = Record<
73
72
export type EmitsOptions = ObjectEmitsOptions | string [ ]
74
73
75
74
// Class component
76
- export function mount < V > (
77
- originalComponent : new ( ...args : any [ ] ) => V ,
78
- options ?: MountingOptions < any >
75
+ export function mount < V , P > (
76
+ originalComponent : {
77
+ new ( ...args : any [ ] ) : V
78
+ props ( Props : P )
79
+ } ,
80
+ options ?: MountingOptions < P >
79
81
) : VueWrapper < ComponentPublicInstance < V > >
80
82
81
83
// Functional component with emits
Original file line number Diff line number Diff line change @@ -119,5 +119,5 @@ class ClassComponent extends Vue {
119
119
}
120
120
121
121
// @ts -expect-error it requires an argument
122
- expectError ( mount ( ClassComponent , { } ) . vm . changeMessage ( ) )
122
+ expectError ( shallowMount ( ClassComponent , { } ) . vm . changeMessage ( ) )
123
123
shallowMount ( ClassComponent , { } ) . vm . changeMessage ( '' )
You can’t perform that action at this time.
0 commit comments