UNPKG

1.22 kBTypeScriptView Raw
1/**
2 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7/// <reference types="node" />
8import { AggregatedResult } from '@jest/test-result';
9import type { Config } from '@jest/types';
10import type { ChangedFilesPromise } from 'jest-changed-files';
11import type { Context } from 'jest-runtime';
12import { JestHookEmitter } from 'jest-watcher';
13import type FailedTestsCache from './FailedTestsCache';
14import type TestWatcher from './TestWatcher';
15import type { Filter } from './types';
16export default function runJest({ contexts, globalConfig, outputStream, testWatcher, jestHooks, startRun, changedFilesPromise, onComplete, failedTestsCache, filter, }: {
17 globalConfig: Config.GlobalConfig;
18 contexts: Array<Context>;
19 outputStream: NodeJS.WriteStream;
20 testWatcher: TestWatcher;
21 jestHooks?: JestHookEmitter;
22 startRun: (globalConfig: Config.GlobalConfig) => void;
23 changedFilesPromise?: ChangedFilesPromise;
24 onComplete: (testResults: AggregatedResult) => void;
25 failedTestsCache?: FailedTestsCache;
26 filter?: Filter;
27}): Promise<void>;