UNPKG

@stryker-mutator/jest-runner

Version:

A plugin to use the jest test runner and framework in Stryker, the JavaScript mutation testing framework

24 lines 884 B
import { pluginTokens } from '../plugin-di.js'; export class JestGreaterThan25TestAdapter { jestWrapper; static inject = [pluginTokens.jestWrapper]; constructor(jestWrapper) { this.jestWrapper = jestWrapper; } async run({ jestConfig, fileNamesUnderTest, testNamePattern, testLocationInResults }) { const config = JSON.stringify(jestConfig); const result = await this.jestWrapper.runCLI({ $0: 'stryker', _: fileNamesUnderTest ? fileNamesUnderTest : [], findRelatedTests: !!fileNamesUnderTest, config, runInBand: true, silent: true, passWithNoTests: true, testNamePattern, testLocationInResults, }, [jestConfig.rootDir ?? process.cwd()]); return result; } } //# sourceMappingURL=jest-greater-than-25-adapter.js.map