UNPKG

633 BPlain TextView Raw
1import fs from 'fs';
2import { URL } from 'url';
3
4import { declareFactoryPlugin, PluginKind } from '@stryker-mutator/api/plugin';
5
6import { mixinJestEnvironment } from './jest-plugins/index.js';
7import { jestTestRunnerFactory } from './jest-test-runner.js';
8
9process.env.BABEL_ENV = 'test';
10
11export const strykerPlugins = [declareFactoryPlugin(PluginKind.TestRunner, 'jest', jestTestRunnerFactory)];
12
13export const strykerValidationSchema: typeof import('../schema/jest-runner-options.json') = JSON.parse(
14 fs.readFileSync(new URL('../schema/jest-runner-options.json', import.meta.url), 'utf-8'),
15);
16
17export { mixinJestEnvironment };