1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | import {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 {LegacyFakeTimers} from '@jest/fake-timers';
|
15 | import {ModernFakeTimers} from '@jest/fake-timers';
|
16 | import {ModuleMocker} from 'jest-mock';
|
17 |
|
18 | declare class NodeEnvironment implements JestEnvironment<Timer> {
|
19 | context: Context | null;
|
20 | fakeTimers: LegacyFakeTimers<Timer> | null;
|
21 | fakeTimersModern: ModernFakeTimers | null;
|
22 | global: Global.Global;
|
23 | moduleMocker: ModuleMocker | null;
|
24 | customExportConditions: string[];
|
25 | private _configuredExportConditions?;
|
26 | constructor(config: JestEnvironmentConfig, _context: EnvironmentContext);
|
27 | setup(): Promise<void>;
|
28 | teardown(): Promise<void>;
|
29 | exportConditions(): Array<string>;
|
30 | getVmContext(): Context | null;
|
31 | }
|
32 | export default NodeEnvironment;
|
33 |
|
34 | export declare const TestEnvironment: typeof NodeEnvironment;
|
35 |
|
36 | declare type Timer = {
|
37 | id: number;
|
38 | ref: () => Timer;
|
39 | unref: () => Timer;
|
40 | };
|
41 |
|
42 | export {};
|