Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using the mixinJestEnvironment mixin results in failing jest tests during normal unit testing #3584

Closed
nicojs opened this issue Jun 23, 2022 · 0 comments · Fixed by #3598
Closed
Labels
🐛 Bug Something isn't working

Comments

@nicojs
Copy link
Member

nicojs commented Jun 23, 2022

Summary

Using the mixin described in the docs results in an error during normal unit testing. I think this bug got introduced in Stryker v6.

Reproduction

In the StrykerJS repo:

cd e2e/test/jest-custom-env
npm run test:unit

This results in:

npm run test:unit

> test:unit
> jest

 FAIL  src/calculator-element.test.js
  ● Test suite failed to run

    TypeError: Cannot assign to read only property 'undefined' of object '[object global]'

      at new StrykerJestEnvironment (../../node_modules/@stryker-mutator/jest-runner/dist/src/jest-plugins/cjs/mixin-jest-environment.js:41:91)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant