@stryker-mutator/mocha-runner
Version:
A plugin to use the mocha test runner in Stryker, the JavaScript mutation testing framework
29 lines • 1.66 kB
TypeScript
import { type INSTRUMENTER_CONSTANTS, StrykerOptions } from '@stryker-mutator/api/core';
import { Logger } from '@stryker-mutator/api/logging';
import { I } from '@stryker-mutator/util';
import { TestRunner, DryRunResult, DryRunOptions, MutantRunOptions, MutantRunResult, TestRunnerCapabilities, MutantActivation } from '@stryker-mutator/api/test-runner';
import { Context } from 'mocha';
import { MochaOptionsLoader } from './mocha-options-loader.js';
import { MochaAdapter } from './mocha-adapter.js';
export declare class MochaTestRunner implements TestRunner {
private readonly log;
private readonly options;
private readonly loader;
private readonly mochaAdapter;
private mocha;
private readonly instrumenterContext;
private originalGrep?;
beforeEach?: (context: Context) => void;
static inject: ["logger", "options", "loader", "mochaAdapter", "globalNamespace"];
private loadedEnv;
constructor(log: Logger, options: StrykerOptions, loader: I<MochaOptionsLoader>, mochaAdapter: I<MochaAdapter>, globalNamespace: typeof INSTRUMENTER_CONSTANTS.NAMESPACE | '__stryker2__');
capabilities(): Promise<TestRunnerCapabilities>;
init(): Promise<void>;
private setIfDefined;
dryRun({ coverageAnalysis, disableBail }: DryRunOptions): Promise<DryRunResult>;
mutantRun({ activeMutant, testFilter, disableBail, hitLimit, mutantActivation }: MutantRunOptions): Promise<MutantRunResult>;
run(disableBail: boolean, activeMutantId?: string, mutantActivation?: MutantActivation): Promise<DryRunResult>;
dispose(): Promise<void>;
private runMocha;
}
//# sourceMappingURL=mocha-test-runner.d.ts.map