1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | import Emittery = require('emittery');
|
8 | import type { Test, TestEvents } from '@jest/test-result';
|
9 | import type { Config } from '@jest/types';
|
10 | import type { OnTestFailure, OnTestStart, OnTestSuccess, TestRunnerContext, TestRunnerOptions, TestWatcher } from './types';
|
11 | export type { Test, TestFileEvent, TestEvents } from '@jest/test-result';
|
12 | export type { OnTestFailure, OnTestStart, OnTestSuccess, TestWatcher, TestRunnerContext, TestRunnerOptions, } from './types';
|
13 | export default class TestRunner {
|
14 | private readonly _globalConfig;
|
15 | private readonly _context;
|
16 | private readonly eventEmitter;
|
17 | readonly __PRIVATE_UNSTABLE_API_supportsEventEmitters__: boolean;
|
18 | readonly isSerial?: boolean;
|
19 | constructor(globalConfig: Config.GlobalConfig, context?: TestRunnerContext);
|
20 | runTests(tests: Array<Test>, watcher: TestWatcher, onStart: OnTestStart | undefined, onResult: OnTestSuccess | undefined, onFailure: OnTestFailure | undefined, options: TestRunnerOptions): Promise<void>;
|
21 | private _createInBandTestRun;
|
22 | private _createParallelTestRun;
|
23 | on<Name extends keyof TestEvents>(eventName: Name, listener: (eventData: TestEvents[Name]) => void | Promise<void>): Emittery.UnsubscribeFn;
|
24 | }
|