@stryker-mutator/jest-runner
Version:
A plugin to use the jest test runner and framework in Stryker, the JavaScript mutation testing framework
32 lines • 1.42 kB
TypeScript
import { Logger } from '@stryker-mutator/api/logging';
import { StrykerOptions } from '@stryker-mutator/api/core';
import type { Config } from '@jest/types';
import type { I, requireResolve } from '@stryker-mutator/util';
import { JestConfigWrapper } from '../utils/jest-config-wrapper.js';
import { JestConfigLoader } from './jest-config-loader.js';
/**
* The Default config loader will load the Jest configuration using the package.json in the package root
*/
export declare class CustomJestConfigLoader implements JestConfigLoader {
private readonly log;
private readonly requireFromCwd;
private readonly jestConfig;
private readonly options;
static inject: ["logger", "options", "requireFromCwd", "jestConfigWrapper"];
constructor(log: Logger, options: StrykerOptions, requireFromCwd: typeof requireResolve, jestConfig: I<JestConfigWrapper>);
loadConfig(): Promise<Config.InitialOptions>;
/**
* Tries to read the jest config via the native jest api, available since jest@>=29.3
*/
private readConfigNative;
/**
* The legacy readConfig functionality
*/
readConfigManually(): Promise<Config.InitialOptions>;
private readConfigFromJestConfigFile;
private readConfigFromPackageJson;
private resolvePackageJsonFilePath;
private setRootDir;
private resolveJestConfigFilePath;
}
//# sourceMappingURL=custom-jest-config-loader.d.ts.map