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

Support Jasmine 4 #3340

Closed
nicojs opened this issue Jan 8, 2022 · 1 comment
Closed

Support Jasmine 4 #3340

nicojs opened this issue Jan 8, 2022 · 1 comment
Labels
🚀 Feature request New feature request

Comments

@nicojs
Copy link
Member

nicojs commented Jan 8, 2022

Is your feature request related to a problem? Please describe.
Jasmine 4 released about a week ago and is not supported.

The biggest issue is that jasmine 4 will use import by default. Previously I didn't think this would be an issue, because using import on a cjs module is supported in nodejs. However, apparently, this breaks our ability to bust the file from require cache. It is in the cache and can be removed, but importing it again will result in the same file in either case. I will investigate this further when I have some time.

This makes #2922 even more important, we should give it the highest priority.

Another smaller change is failFast got renamed to stopOnSpecFailure.

See release notes for a full list of changes.

This was also apparent in our CI pipeline. The CI for node 16 was broken. Node 16 comes with npm 7 which installs peerDependencies by default. This made it so we got jasmine 4 as a dependency of jasmine-runner, which broke the ci. See https://github.com/stryker-mutator/stryker-js/runs/4738780880?check_suite_focus=true

@stryker-mutator/jasmine-runner:   JasmineRunner integration with code instrumentation
@stryker-mutator/jasmine-runner:     dryRun
@stryker-mutator/jasmine-runner:       ✔ should not report coverage when coverageAnalysis is "off" (42ms)
@stryker-mutator/jasmine-runner:       1) should report static coverage when coverageAnalysis is "all"
@stryker-mutator/jasmine-runner:       2) should report static and perTest coverage when coverageAnalysis is "perTest"
@stryker-mutator/jasmine-runner:     mutantRun
@stryker-mutator/jasmine-runner:       3) should be able to kill a mutant
@stryker-mutator/jasmine-runner:       ✔ should be able report "survive" when a mutant is invincible
@stryker-mutator/jasmine-runner:       4) should be able to kill again after a mutant survived
@stryker-mutator/jasmine-runner:       5) should report all killed mutants when disableBail is true
@stryker-mutator/jasmine-runner:   JasmineRunner integration
@stryker-mutator/jasmine-runner:     using the jasmine-init project
@stryker-mutator/jasmine-runner:       ✔ should run the specs
@stryker-mutator/jasmine-runner:       6) should be able to run twice in short succession
@stryker-mutator/jasmine-runner:       7) should be able to filter tests
@stryker-mutator/jasmine-runner:       8) should be able to clear the filter after a filtered run
@stryker-mutator/jasmine-runner:       9) should be able to filter tests in quick succession
@stryker-mutator/jasmine-runner:     using a jasmine-project with errors
@stryker-mutator/jasmine-runner:       ✔ should be able to tell the error
@stryker-mutator/jasmine-runner:     when it includes failed tests
@stryker-mutator/jasmine-runner:       10) should complete with first test failure (bail)

Describe the solution you'd like

For now, we should place <4 in the peer dependency range. And then fix #2922

Describe alternatives you've considered

Additional context
See #2922

@nicojs nicojs added the 🚀 Feature request New feature request label Jan 8, 2022
@nicojs nicojs pinned this issue Jan 8, 2022
nicojs added a commit that referenced this issue Jan 28, 2022
* Uses `autoCleanClosures: false` in order to reuse jasmine instances between runs. This comes with a big performance boost (4x)
* Implements hot reload in jasmine.
* Sets `reloadEnvironment` capabilities to `false`. Meaning that static mutants will always force a reload of the environment. This comes with a performance penalty. If you don't want that, please run with `--ignoreStatic`.
* Add support for jasmine 4 (Closes #3340)

BREAKING CHANGE: The `@stryker-mutator/jamsine-runner` now requires jasmine@3.10 or higher.
nicojs added a commit that referenced this issue Jan 31, 2022
Add support for native es modules (esm) in the jasmine runner.

* Uses `autoCleanClosures: false` in order to reuse jasmine instances between runs. This comes with a big performance boost (4x)
* Implements hot reload in jasmine.
* Sets `reloadEnvironment` capabilities to `false`. Meaning that static mutants will always force a reload of the environment. This comes with a performance penalty. If you don't want that, please run with `--ignoreStatic`.
* Add support for jasmine 4 (Closes #3340)

BREAKING CHANGE: The `@stryker-mutator/jamsine-runner` now requires jasmine@3.10 or higher.
@nicojs
Copy link
Member Author

nicojs commented Jan 31, 2022

Fixed with #3396 to be released with v6

@nicojs nicojs closed this as completed Jan 31, 2022
@nicojs nicojs unpinned this issue May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 Feature request New feature request
Projects
None yet
Development

No branches or pull requests

1 participant