-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
52 lines (48 loc) · 1.7 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import { ElectronApplication } from "playwright-core"
import { Configuration as ElectronBuilderOptions } from 'electron-builder'
import * as ChainableWebpackConfig from 'webpack-chain'
interface OptionsPlaywright {
/**
Do not launch playwright.
You will have to launch it on your own.
*/
noPlaywright: boolean
/** Launch server in dev mode, not in production. */
forceDev: boolean
/** Custom playwright launch options. These will be merged with default options. */
launchOptions: Object
/** Set custom Vue env mode. Defaults to 'test' */
mode: string
}
interface ServerPlaywright {
/** Playwright instance. */
app: ElectronApplication
/** URL of dev server. */
url: string
/** Close playwright and stop dev server (must be called to prevent continued async operations). */
stop: () => Promise<void>
/** Log of dev server. */
stdout: string
}
/**
Run electron:serve, but instead of launching Electron it returns a Playwright Application instance.
Used for e2e testing with Playwright.
*/
export function testWithPlaywright(options?: Partial<OptionsPlaywright>): Promise<ServerPlaywright>
export type PluginOptions = {
builderOptions?: ElectronBuilderOptions,
chainWebpackMainProcess?: (config?: ChainableWebpackConfig) => void,
chainWebpackRendererProcess?: (config?: ChainableWebpackConfig) => void,
mainProcessFile?: string,
rendererProcessFile?: string,
mainProcessWatch?: string[],
mainProcessArgs?: string[],
outputDir?: string,
disableMainProcessTypescript?: boolean,
mainProcessTypeChecking?: boolean,
customFileProtocol?: string,
removeElectronJunk?: boolean,
externals?: string[],
nodeModulesPath?: string[],
preload?: string | Record<string, string>
}