2020-02-11 00:20:13 +03:00
|
|
|
type ServerResponse = import('http').ServerResponse;
|
|
|
|
type IncomingMessage = import('http').IncomingMessage;
|
|
|
|
|
2020-03-03 00:47:08 +03:00
|
|
|
type DescribeFunction = ((name: string, inner: () => void) => void) & {fail(condition: boolean): DescribeFunction};
|
2020-02-11 00:20:13 +03:00
|
|
|
|
2020-07-08 10:20:36 +03:00
|
|
|
type ItFunction<STATE> = ((name: string, inner: (state: STATE) => Promise<void>) => void) & {
|
|
|
|
fail(condition: boolean): ItFunction<STATE>;
|
|
|
|
skip(condition: boolean): ItFunction<STATE>;
|
|
|
|
slow(): ItFunction<STATE>;
|
|
|
|
repeat(n: number): ItFunction<STATE>;
|
|
|
|
};
|
2020-02-11 00:20:13 +03:00
|
|
|
|
2020-08-11 02:48:34 +03:00
|
|
|
interface WorkerState {
|
2020-08-07 21:19:15 +03:00
|
|
|
}
|
2020-02-11 00:20:13 +03:00
|
|
|
|
2020-08-11 02:48:34 +03:00
|
|
|
interface FixtureState {
|
2020-02-21 02:15:48 +03:00
|
|
|
}
|
2020-08-11 02:48:34 +03:00
|
|
|
|
2020-08-07 21:19:15 +03:00
|
|
|
declare module '' {
|
|
|
|
module 'expect/build/types' {
|
|
|
|
interface Matchers<R> {
|
|
|
|
toBeGolden(name: string): R;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
declare const expect: typeof import('expect');
|
|
|
|
|
2020-07-08 10:20:36 +03:00
|
|
|
|
|
|
|
declare const describe: DescribeFunction;
|
|
|
|
declare const fdescribe: DescribeFunction;
|
|
|
|
declare const xdescribe: DescribeFunction;
|
2020-08-11 02:48:34 +03:00
|
|
|
declare const it: ItFunction<FixtureState & WorkerState>;
|
|
|
|
declare const fit: ItFunction<FixtureState & WorkerState>;
|
|
|
|
declare const dit: ItFunction<FixtureState & WorkerState>;
|
|
|
|
declare const xit: ItFunction<FixtureState & WorkerState>;
|
|
|
|
|
|
|
|
declare const beforeEach: (inner: (state: FixtureState & WorkerState) => Promise<void>) => void;
|
|
|
|
declare const afterEach: (inner: (state: FixtureState & WorkerState) => Promise<void>) => void;
|
|
|
|
declare const beforeAll: (inner: (state: WorkerState) => Promise<void>) => void;
|
|
|
|
declare const afterAll: (inner: (state: WorkerState) => Promise<void>) => void;
|
2020-08-07 21:19:15 +03:00
|
|
|
|
2020-08-11 02:48:34 +03:00
|
|
|
declare const registerFixture: <T extends keyof FixtureState>(name: T, inner: (state: FixtureState & WorkerState, test: (arg: FixtureState[T]) => Promise<void>) => Promise<void>) => void;
|
|
|
|
declare const registerWorkerFixture: <T extends keyof WorkerState>(name: T, inner: (state: WorkerState, test: (arg: WorkerState[T]) => Promise<void>) => Promise<void>) => void;
|
2020-08-07 21:19:15 +03:00
|
|
|
|
2020-07-08 10:20:36 +03:00
|
|
|
declare const browserType: import('../index').BrowserType<import('../index').Browser>;
|
|
|
|
|
|
|
|
// global variables in assets
|
2020-08-06 18:27:00 +03:00
|
|
|
declare const testOptions: {
|
|
|
|
FFOX: boolean;
|
|
|
|
WEBKIT: boolean;
|
|
|
|
CHROMIUM: boolean;
|
|
|
|
MAC: boolean;
|
|
|
|
LINUX: boolean;
|
|
|
|
WIN: boolean;
|
|
|
|
HEADLESS: boolean;
|
|
|
|
OUTPUT_DIR: string;
|
|
|
|
USES_HOOKS: boolean;
|
|
|
|
CHANNEL: boolean;
|
2020-08-07 00:12:14 +03:00
|
|
|
ASSETS_DIR: string;
|
2020-08-06 18:27:00 +03:00
|
|
|
};
|
2020-07-08 10:20:36 +03:00
|
|
|
|
2020-08-11 02:48:34 +03:00
|
|
|
declare const testPath : string;
|
|
|
|
|
2020-07-08 10:20:36 +03:00
|
|
|
// keyboard.html
|
|
|
|
declare function getResult(): string;
|