-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f492ea3
commit a9a2fa7
Showing
4 changed files
with
232 additions
and
438 deletions.
There are no files selected for viewing
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,17 @@ | ||
import { NightwatchAPI, Element } from 'nightwatch'; | ||
// import { MountingOptions } from '@vue/test-utils'; | ||
import type { ComponentConstructorOptions, ComponentProps, SvelteComponent } from 'svelte' | ||
|
||
// type GlobalMountOptions = NonNullable<MountingOptions<any>['global']>; | ||
type SvelteComponentOptions<T extends SvelteComponent> = Omit< | ||
ComponentConstructorOptions<ComponentProps<T>>, | ||
'hydrate' | 'target' | '$$inline' | ||
>; | ||
|
||
declare module 'nightwatch' { | ||
interface NightwatchAPI { | ||
importScript( | ||
scriptPath: string, | ||
options: { scriptType: string; componentType: string }, | ||
callback?: () => void | ||
): this; | ||
// mountComponent( | ||
// componentPath: string, | ||
// options?: { | ||
// props?: MountingOptions<Record<string, any>>['props']; | ||
// plugin?: Pick<GlobalMountOptions, 'plugins'>; | ||
// mocks?: Pick<GlobalMountOptions, 'mocks'>; | ||
// }, | ||
// callback?: (this: NightwatchAPI, result: Element) => void | ||
// ): Awaitable<this, Element>; | ||
mountSvelteComponent<T extends SvelteComponent>( | ||
componentPath: string, | ||
options?: SvelteComponentOptions<T>, | ||
callback?: (this: NightwatchAPI, result: Element) => void | ||
): Awaitable<this, Element>; | ||
launchComponentRenderer(): this; | ||
} | ||
} |
Oops, something went wrong.