forked from sveltejs/kit
/
utils.d.ts
40 lines (36 loc) · 1.12 KB
/
utils.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
import {
PlaywrightTestArgs,
PlaywrightTestConfig,
PlaywrightTestOptions,
PlaywrightWorkerArgs,
PlaywrightWorkerOptions,
TestType
} from '@playwright/test';
import { IncomingMessage, ServerResponse } from 'http';
import { Plugin } from 'vite';
export const test: TestType<
PlaywrightTestArgs &
PlaywrightTestOptions & {
app: {
goto: (url: string, opts?: { replaceState?: boolean }) => Promise<void>;
invalidate: (url: string) => Promise<void>;
beforeNavigate: (url: URL) => void | boolean;
afterNavigate: (url: URL) => void;
prefetch: (url: string) => Promise<void>;
prefetchRoutes: (urls: string[]) => Promise<void>;
};
clicknav: (selector: string, options?: { timeout?: number }) => Promise<void>;
in_view: (selector: string) => Promise<boolean>;
read_errors: (href: string) => string;
},
PlaywrightWorkerArgs & PlaywrightWorkerOptions
>;
export const config: PlaywrightTestConfig;
export const start_server: (
handler: (req: IncomingMessage, res: ServerResponse) => void,
start?: number
) => Promise<{
port: number;
close: () => Promise<void>;
}>;
export const plugin: () => Plugin;