UNPKG

2.2 kBTypeScriptView Raw
1import { StrykerOptions, INSTRUMENTER_CONSTANTS } from '@stryker-mutator/api/core';
2import { Logger } from '@stryker-mutator/api/logging';
3import { Injector, PluginContext } from '@stryker-mutator/api/plugin';
4import { TestRunner, MutantRunOptions, DryRunResult, MutantRunResult, DryRunOptions, TestRunnerCapabilities } from '@stryker-mutator/api/test-runner';
5import { JestTestAdapter } from './jest-test-adapters/jest-test-adapter.js';
6import { JestConfigLoader } from './config-loaders/jest-config-loader.js';
7import { JestWrapper } from './utils/index.js';
8export declare function createJestTestRunnerFactory(namespace?: typeof INSTRUMENTER_CONSTANTS.NAMESPACE | '__stryker2__'): {
9 (injector: Injector<PluginContext>): JestTestRunner;
10 inject: ['$injector'];
11};
12export declare const jestTestRunnerFactory: {
13 (injector: Injector<PluginContext>): JestTestRunner;
14 inject: ['$injector'];
15};
16export declare class JestTestRunner implements TestRunner {
17 private readonly log;
18 private readonly jestTestAdapter;
19 private readonly configLoader;
20 private readonly jestWrapper;
21 private readonly globalNamespace;
22 private jestConfig;
23 private readonly jestOptions;
24 private readonly enableFindRelatedTests;
25 static inject: ["logger", "options", "jestTestAdapter", "configLoader", "jestWrapper", "globalNamespace"];
26 constructor(log: Logger, options: StrykerOptions, jestTestAdapter: JestTestAdapter, configLoader: JestConfigLoader, jestWrapper: JestWrapper, globalNamespace: typeof INSTRUMENTER_CONSTANTS.NAMESPACE | '__stryker2__');
27 init(): Promise<void>;
28 capabilities(): TestRunnerCapabilities;
29 dryRun({ coverageAnalysis, files }: Pick<DryRunOptions, 'coverageAnalysis' | 'files'>): Promise<DryRunResult>;
30 mutantRun({ activeMutant, sandboxFileName, testFilter, disableBail, hitLimit }: MutantRunOptions): Promise<MutantRunResult>;
31 private configForDryRun;
32 private configForMutantRun;
33 private configWithRoots;
34 private run;
35 private collectRunResult;
36 private collectSerializableErrorText;
37 private setEnv;
38 private processTestResults;
39 private mergeConfigSettings;
40}
41//# sourceMappingURL=jest-test-runner.d.ts.map
\No newline at end of file