stryker
Version:
The extendable JavaScript mutation testing framework
47 lines • 2.08 kB
TypeScript
import { RunResult } from 'stryker-api/test_runner';
import { TestFramework } from 'stryker-api/test_framework';
import { Transpiler } from 'stryker-api/transpile';
import { StrykerOptions } from 'stryker-api/core';
import { Logger } from 'stryker-api/logging';
import Timer from '../utils/Timer';
import { CoverageMapsByFile } from '../transpiler/CoverageInstrumenterTranspiler';
import InputFileCollection from '../input/InputFileCollection';
import SourceMapper from '../transpiler/SourceMapper';
import LoggingClientContext from '../logging/LoggingClientContext';
export interface InitialTestRunResult {
runResult: RunResult;
overheadTimeMS: number;
sourceMapper: SourceMapper;
coverageMaps: CoverageMapsByFile;
}
export default class InitialTestExecutor {
private readonly options;
private readonly log;
private readonly inputFiles;
private readonly testFramework;
private readonly timer;
private readonly loggingContext;
private readonly transpiler;
static inject: ["options", "logger", "inputFiles", "testFramework", "timer", "loggingContext", "transpiler"];
constructor(options: StrykerOptions, log: Logger, inputFiles: InputFileCollection, testFramework: TestFramework | null, timer: Timer, loggingContext: LoggingClientContext, transpiler: Transpiler);
run(): Promise<InitialTestRunResult>;
private runInSandbox;
private annotateForCodeCoverage;
private validateResult;
/**
* Calculates the timing variables for the test run.
* grossTime = NetTime + overheadTime
*
* The overhead time is used to calculate exact timeout values during mutation testing.
* See timeoutMS setting in README for more information on this calculation
*/
private calculateTiming;
private getCollectCoverageHooksIfNeeded;
private logTranspileResult;
private filterOutFailedTests;
private logInitialTestRunSucceeded;
private logFailedTestsInInitialRun;
private logErrorsInInitialRun;
private logTimeoutInitialRun;
}
//# sourceMappingURL=InitialTestExecutor.d.ts.map