16:45:45 (461656) INFO ProjectReader No incremental result file found at reports/stryker-incremental.json, a full mutation testing run will be performed.
16:45:45 (461656) INFO ProjectReader Found 4 of 2073 file(s) to be mutated.
16:45:45 (461656) INFO Instrumenter Instrumented 4 source file(s) with 130 mutant(s)
16:45:45 (461656) INFO ConcurrencyTokenProvider Creating 8 checker process(es) and 7 test runner process(es).
16:45:49 (461656) INFO DryRunExecutor Starting initial test run (jest test runner with "perTest" coverage analysis). This may take a while.
16:45:55 (461656) ERROR DryRunExecutor One or more tests failed in the initial test run:
PlansFilters should render successfully
ReferenceError: document is not defined
at render (/home/user/Webdevelopment/Freelancing/org/repo/node_modules/.pnpm/@testing-library+react@14.0.0_react-dom@18.2.0_react@18.2.0/node_modules/@testing-library/react/dist/pure.js:215:5)
at Object.<anonymous> (/home/user/Webdevelopment/Freelancing/org/repo/.stryker-tmp/sandbox726489/apps/repo-ui/components/plans/PlansFilters.spec.tsx:64:11)
at Promise.then.completed (/home/user/Webdevelopment/Freelancing/org/repo/node_modules/.pnpm/jest-circus@29.4.1/node_modules/jest-circus/build/utils.js:290:28)
at new Promise (<anonymous>)
at callAsyncCircusFn (/home/user/Webdevelopment/Freelancing/org/repo/node_modules/.pnpm/jest-circus@29.4.1/node_modules/jest-circus/build/utils.js:223:10)
at _callCircusTest (/home/user/Webdevelopment/Freelancing/org/repo/node_modules/.pnpm/jest-circus@29.4.1/node_modules/jest-circus/build/run.js:248:40)
at async _runTest (/home/user/Webdevelopment/Freelancing/org/repo/node_modules/.pnpm/jest-circus@29.4.1/node_modules/jest-circus/build/run.js:184:3)
at async _runTestsForDescribeBlock (/home/user/Webdevelopment/Freelancing/org/repo/node_modules/.pnpm/jest-circus@29.4.1/node_modules/jest-circus/build/run.js:86:9)
at async _runTestsForDescribeBlock (/home/user/Webdevelopment/Freelancing/org/repo/node_modules/.pnpm/jest-circus@29.4.1/node_modules/jest-circus/build/run.js:81:9)
at async run (/home/user/Webdevelopment/Freelancing/org/repo/node_modules/.pnpm/jest-circus@29.4.1/node_modules/jest-circus/build/run.js:26:3)
PlansFiltersItemRadioRadio should render successfully
ReferenceError: document is not defined
at render (/home/user/Webdevelopment/Freelancing/org/repo/node_modules/.pnpm/@testing-library+react@14.0.0_react-dom@18.2.0_react@18.2.0/node_modules/@testing-library/react/dist/pure.js:215:5)
at Object.<anonymous> (/home/user/Webdevelopment/Freelancing/org/repo/.stryker-tmp/sandbox726489/apps/repo-ui/components/plans/PlansFiltersItemRadio.spec.tsx:12:11)
at Promise.then.completed (/home/user/Webdevelopment/Freelancing/org/repo/node_modules/.pnpm/jest-circus@29.4.1/node_modules/jest-circus/build/utils.js:290:28)
at new Promise (<anonymous>)
at callAsyncCircusFn (/home/user/Webdevelopment/Freelancing/org/repo/node_modules/.pnpm/jest-circus@29.4.1/node_modules/jest-circus/build/utils.js:223:10)
at _callCircusTest (/home/user/Webdevelopment/Freelancing/org/repo/node_modules/.pnpm/jest-circus@29.4.1/node_modules/jest-circus/build/run.js:248:40)
at async _runTest (/home/user/Webdevelopment/Freelancing/org/repo/node_modules/.pnpm/jest-circus@29.4.1/node_modules/jest-circus/build/run.js:184:3)
at async _runTestsForDescribeBlock (/home/user/Webdevelopment/Freelancing/org/repo/node_modules/.pnpm/jest-circus@29.4.1/node_modules/jest-circus/build/run.js:86:9)
at async _runTestsForDescribeBlock (/home/user/Webdevelopment/Freelancing/org/repo/node_modules/.pnpm/jest-circus@29.4.1/node_modules/jest-circus/build/run.js:81:9)
at async run (/home/user/Webdevelopment/Freelancing/org/repo/node_modules/.pnpm/jest-circus@29.4.1/node_modules/jest-circus/build/run.js:26:3)
PlansFiltersItem should render successfully
ReferenceError: document is not defined
at render (/home/user/Webdevelopment/Freelancing/org/repo/node_modules/.pnpm/@testing-library+react@14.0.0_react-dom@18.2.0_react@18.2.0/node_modules/@testing-library/react/dist/pure.js:215:5)
at Object.<anonymous> (/home/user/Webdevelopment/Freelancing/org/repo/.stryker-tmp/sandbox726489/apps/repo-ui/components/plans/PlansFiltersItem.spec.tsx:12:11)
at Promise.then.completed (/home/user/Webdevelopment/Freelancing/org/repo/node_modules/.pnpm/jest-circus@29.4.1/node_modules/jest-circus/build/utils.js:290:28)
at new Promise (<anonymous>)
at callAsyncCircusFn (/home/user/Webdevelopment/Freelancing/org/repo/node_modules/.pnpm/jest-circus@29.4.1/node_modules/jest-circus/build/utils.js:223:10)
at _callCircusTest (/home/user/Webdevelopment/Freelancing/org/repo/node_modules/.pnpm/jest-circus@29.4.1/node_modules/jest-circus/build/run.js:248:40)
at async _runTest (/home/user/Webdevelopment/Freelancing/org/repo/node_modules/.pnpm/jest-circus@29.4.1/node_modules/jest-circus/build/run.js:184:3)
at async _runTestsForDescribeBlock (/home/user/Webdevelopment/Freelancing/org/repo/node_modules/.pnpm/jest-circus@29.4.1/node_modules/jest-circus/build/run.js:86:9)
at async _runTestsForDescribeBlock (/home/user/Webdevelopment/Freelancing/org/repo/node_modules/.pnpm/jest-circus@29.4.1/node_modules/jest-circus/build/run.js:81:9)
at async run (/home/user/Webdevelopment/Freelancing/org/repo/node_modules/.pnpm/jest-circus@29.4.1/node_modules/jest-circus/build/run.js:26:3)
16:45:55 (461656) ERROR Stryker There were failed tests in the initial test run.
Summary
As described in the issue title, the mutation run errors out and crashes with a stack trace pointing to
@testing-library/react
Changing
coverageAnalysis
tooff
gets rid of the error and the mutation testing works as expected.Stryker config
Test runner config
Stryker environment
Test runner environment
Your Environment
Add stryker.log