Skip to content

Commit

Permalink
fix(jest): support more config file formats (#3761)
Browse files Browse the repository at this point in the history
Support all config file formats using jest's native config reading (including `jest.config.ts`). See https://jestjs.io/docs/configuration for a list of all available config formats.

Stryker only uses jest's native functionality if it finds `jest@>=29.2`, otherwise, it falls back on its custom config file reading algorithm. 

This also adds support for exporting an `async` function from your jest config file even for `jest@<29.2`, because of added functionality in the custom config loading logic.
  • Loading branch information
nicojs committed Oct 29, 2022
1 parent 9fc7a6f commit 7d42139
Show file tree
Hide file tree
Showing 24 changed files with 12,595 additions and 12,018 deletions.
1,450 changes: 772 additions & 678 deletions e2e/package-lock.json

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions e2e/test/incremental/verify/verify.js
Expand Up @@ -4,13 +4,12 @@ import { fileURLToPath } from 'url';

import { Stryker } from '@stryker-mutator/core';
import { expect } from 'chai';

import '../../../helpers.js';

import { PlanKind } from '@stryker-mutator/api/core';

import { MutationRunPlanReporter } from './mutation-run-plan-reporter.js';

import '../../../helpers.js';

const incrementalFile = new URL('../reports/stryker-incremental.json', import.meta.url);

describe('incremental', () => {
Expand Down Expand Up @@ -51,7 +50,7 @@ describe('incremental', () => {
*/
const tests = [
['cucumber', reuseCountExpectation.withFullTestResults],
['jest', reuseCountExpectation.withFullTestResults, { testRunnerNodeArgs: ['--experimental-vm-modules'] }],
['jest', reuseCountExpectation.withFullTestResults, { testRunnerNodeArgs: ['--experimental-vm-modules'], tempDirName: 'stryker-tmp' }],

['mocha', reuseCountExpectation.withoutTestLocations],

Expand Down

0 comments on commit 7d42139

Please sign in to comment.