Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

Jest v20 is not supported #15

Closed
nicojs opened this issue Aug 10, 2017 · 4 comments
Closed

Jest v20 is not supported #15

nicojs opened this issue Aug 10, 2017 · 4 comments
Assignees

Comments

@nicojs
Copy link
Member

nicojs commented Aug 10, 2017

When running stryker with jest@20 i get this error:

$ stryker run
[2017-08-10 18:49:25.840] [INFO] ConfigReader - Using stryker.conf.js in the current working directory.
[2017-08-10 18:49:26.015] [INFO] InputFileResolver - Found 1 of 2 file(s) to be mutated.
[2017-08-10 18:49:26.016] [INFO] SandboxCoordinator - Starting initial test run. This may take a while.
[2017-08-10 18:49:26.685] [ERROR] IsolatedTestRunnerAdapter - (node:17004) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Runtime.createHasteContext is not a function

[2017-08-10 18:49:26.685] [ERROR] IsolatedTestRunnerAdapter - (node:17004) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Reproduce:

git clone git@github.com:nicojs/mutant-testing.git
cd mutant-testing
npm i
npm run stryker
@mthmulders
Copy link
Collaborator

Seems Jest v19 is working out of the box, whereas v20 is not. Seeing the changelog for v20, it's no surprise it breaks here. I'll take a look!

@nicojs
Copy link
Member Author

nicojs commented Aug 10, 2017

Great, thanks!

Change logs don't include changes to private apis. Maybe we can find the time to present our solution to be promoted as a public api? Or they can help us accomplish the same things using public apis?

@mthmulders
Copy link
Collaborator

@Fenntasy, thanks for the report and the nice reproduction repo. Made it pretty easy to pinpoint what's going on :). A fix is on it's way!

As an aside: I noticed in your repo that you have coverageAnalysis set to 'perTest'. Note that the Jest runner currently doesn't support coverage analysis. If you do configure Stryker to work with coverage analysis, I'm pretty sure it will break somewhere since the Jest runner doesn't properly export the expected data.

@mthmulders
Copy link
Collaborator

Fixed in v0.1.0. Thanks again for the report!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants