Skip to content

Commit d0ae9f8

Browse files
author
Vaibhav Singh
authored
Add: type declaration file, update dependencies (#3)
1 parent 10337b9 commit d0ae9f8

File tree

3 files changed

+1978
-2218
lines changed

3 files changed

+1978
-2218
lines changed

index.d.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { NightwatchAPI, Element } from 'nightwatch';
2+
import { MountingOptions } from '@vue/test-utils';
3+
4+
type GlobalMountOptions = NonNullable<MountingOptions<any>['global']>;
5+
6+
declare module 'nightwatch' {
7+
interface NightwatchAPI {
8+
importScript(
9+
scriptPath: string,
10+
options: { scriptType: string; componentType: string },
11+
callback?: () => void
12+
): this;
13+
mountComponent(
14+
componentPath: string,
15+
options?: {
16+
props?: Pick<MountingOptions<any>, 'props'>;
17+
plugin?: Pick<GlobalMountOptions, 'plugins'>;
18+
mocks?: Pick<GlobalMountOptions, 'mocks'>;
19+
},
20+
callback?: (this: NightwatchAPI, result: Element) => void
21+
): Awaitable<this, Element>;
22+
launchComponentRenderer(): this;
23+
}
24+
}

0 commit comments

Comments
 (0)