UNPKG

@stryker-mutator/jest-runner

Version:

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

25 lines (20 loc) 679 B
// @ts-expect-error import type { CoverageAnalysis, InstrumenterContext } from '@stryker-mutator/api/core'; class State { public instrumenterContext!: InstrumenterContext; public testFilesWithStrykerEnvironment = new Set<string>(); public coverageAnalysis!: CoverageAnalysis; public jestEnvironment!: string; public resolveFromDirectory!: string; constructor() { this.clear(); } public clear() { this.testFilesWithStrykerEnvironment.clear(); this.instrumenterContext = {}; this.coverageAnalysis = 'off'; this.jestEnvironment = 'jest-environment-node'; this.resolveFromDirectory = process.cwd(); } } export const state = new State();