1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | import type {Context} from 'vm';
|
10 | import type {EnvironmentContext} from '@jest/environment';
|
11 | import type {Global} from '@jest/types';
|
12 | import type {JestEnvironment} from '@jest/environment';
|
13 | import type {JestEnvironmentConfig} from '@jest/environment';
|
14 | import {JSDOM} from 'jsdom';
|
15 | import {LegacyFakeTimers} from '@jest/fake-timers';
|
16 | import {ModernFakeTimers} from '@jest/fake-timers';
|
17 | import {ModuleMocker} from 'jest-mock';
|
18 |
|
19 | declare class JSDOMEnvironment implements JestEnvironment<number> {
|
20 | dom: JSDOM | null;
|
21 | fakeTimers: LegacyFakeTimers<number> | null;
|
22 | fakeTimersModern: ModernFakeTimers | null;
|
23 | global: Win;
|
24 | private errorEventListener;
|
25 | moduleMocker: ModuleMocker | null;
|
26 | customExportConditions: string[];
|
27 | private _configuredExportConditions?;
|
28 | constructor(config: JestEnvironmentConfig, context: EnvironmentContext);
|
29 | setup(): Promise<void>;
|
30 | teardown(): Promise<void>;
|
31 | exportConditions(): Array<string>;
|
32 | getVmContext(): Context | null;
|
33 | }
|
34 | export default JSDOMEnvironment;
|
35 |
|
36 | export declare const TestEnvironment: typeof JSDOMEnvironment;
|
37 |
|
38 | declare type Win = Window &
|
39 | Global.Global & {
|
40 | Error: {
|
41 | stackTraceLimit: number;
|
42 | };
|
43 | };
|
44 |
|
45 | export {};
|