2020-02-10 22:20:13 +01:00
|
|
|
type ServerResponse = import('http').ServerResponse;
|
|
|
|
|
type IncomingMessage = import('http').IncomingMessage;
|
|
|
|
|
|
2020-03-02 22:47:08 +01:00
|
|
|
type DescribeFunction = ((name: string, inner: () => void) => void) & {fail(condition: boolean): DescribeFunction};
|
2020-02-10 22:20:13 +01:00
|
|
|
|
2020-07-08 09:20:36 +02: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-10 22:20:13 +01:00
|
|
|
|
2020-08-11 01:48:34 +02:00
|
|
|
interface WorkerState {
|
2020-08-07 20:19:15 +02:00
|
|
|
}
|
2020-02-10 22:20:13 +01:00
|
|
|
|
2020-08-11 01:48:34 +02:00
|
|
|
interface FixtureState {
|
2020-02-21 00:15:48 +01:00
|
|
|
}
|
2020-08-11 01:48:34 +02:00
|
|
|
|
2020-08-07 20:19:15 +02:00
|
|
|
declare module '' {
|
|
|
|
|
module 'expect/build/types' {
|
|
|
|
|
interface Matchers<R> {
|
2020-08-14 02:32:27 +02:00
|
|
|
toMatchImage(path: string): R;
|
2020-08-07 20:19:15 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
declare const expect: typeof import('expect');
|
|
|
|
|
|
2020-07-08 09:20:36 +02:00
|
|
|
declare const describe: DescribeFunction;
|
|
|
|
|
declare const fdescribe: DescribeFunction;
|
|
|
|
|
declare const xdescribe: DescribeFunction;
|
2020-08-11 01:48:34 +02: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 20:19:15 +02:00
|
|
|
|
2020-07-08 09:20:36 +02:00
|
|
|
declare const browserType: import('../index').BrowserType<import('../index').Browser>;
|
|
|
|
|
|
|
|
|
|
// global variables in assets
|
2020-08-06 17:27:00 +02:00
|
|
|
declare const testOptions: {
|
|
|
|
|
HEADLESS: boolean;
|
2020-08-14 01:00:23 +02:00
|
|
|
WIRE: boolean;
|
2020-08-06 17:27:00 +02:00
|
|
|
};
|
2020-07-08 09:20:36 +02:00
|
|
|
|
2020-08-14 16:22:54 +02:00
|
|
|
declare var MAC: boolean;
|
|
|
|
|
declare var LINUX: boolean;
|
|
|
|
|
declare var WIN: boolean;
|
|
|
|
|
declare var CHROMIUM: boolean;
|
|
|
|
|
declare var FFOX: boolean;
|
|
|
|
|
declare var WEBKIT: boolean;
|
2020-08-11 01:48:34 +02:00
|
|
|
|
2020-07-08 09:20:36 +02:00
|
|
|
// keyboard.html
|
|
|
|
|
declare function getResult(): string;
|