runJest.d.ts 1.2 KB

123456789101112131415161718192021222324252627
  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" />
  8. import { AggregatedResult } from '@jest/test-result';
  9. import type { Config } from '@jest/types';
  10. import type { ChangedFilesPromise } from 'jest-changed-files';
  11. import type { Context } from 'jest-runtime';
  12. import { JestHookEmitter } from 'jest-watcher';
  13. import type FailedTestsCache from './FailedTestsCache';
  14. import type TestWatcher from './TestWatcher';
  15. import type { Filter } from './types';
  16. export 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>;