testWorker.d.ts 954 B

1234567891011121314151617181920212223242526
  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. */
  8. import type { TestResult } from '@jest/test-result';
  9. import type { Config } from '@jest/types';
  10. import { SerializableModuleMap } from 'jest-haste-map';
  11. import type { TestRunnerSerializedContext } from './types';
  12. export declare type SerializableResolver = {
  13. config: Config.ProjectConfig;
  14. serializableModuleMap: SerializableModuleMap;
  15. };
  16. declare type WorkerData = {
  17. config: Config.ProjectConfig;
  18. globalConfig: Config.GlobalConfig;
  19. path: Config.Path;
  20. context?: TestRunnerSerializedContext;
  21. };
  22. export declare function setup(setupData: {
  23. serializableResolvers: Array<SerializableResolver>;
  24. }): void;
  25. export declare function worker({ config, globalConfig, path, context, }: WorkerData): Promise<TestResult>;
  26. export {};