Closed nicojs closed 1 year ago
Can you try the npm-multiple-runs branch e.g. npm install --save-dev github:jasmine/jasmine-npm#npm-multiple-runs
? It works for your minimal repro and I think it fixes all the relevant failures in the stryker-js repo, but I get some (probably extraneous) failures even on master so I wanted to double-check before releasing the fix.
💚 Seems to work: https://github.com/stryker-mutator/stryker-js/pull/4190 https://github.com/stryker-mutator/stryker-js/actions/runs/5187773793/jobs/9350550686?pr=4190 (unsure if you can see this link)
TY. I'll try to get that released later this week.
This is released in 5.0.1.
Note that the bug is still present if you do new Jasmine({globals: false})
. And it always has been, all the way back to 4.0 when that option was first introduced. Fixing that in a sane way probably requires a major rethink of the no-globals design, so I'm probably going to leave it alone unless somebody actually says that they need that particular combination of features.
Since Jasmine 5, settings seem to bleed over in the next
Jasmine
instance. See this example:Expected:
Actual:
See reproduction repo: jasmine-issue.zip
node run-jasmine.js
reproduces it.Downgrading jasmine fixes the issue:
Background info: StrykerJS relies on the jasmine API to run mutation testing. Although we generally only create 1 instance of jasmine, we still want to rely in settings not bleeding over to the next instance.