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

Remove sandboxFileNames from test runner options and it's relience upon in Jasmine runner #2351

Closed
nicojs opened this issue Aug 5, 2020 · 0 comments · Fixed by #2369
Closed
Labels
🚀 Feature request New feature request
Milestone

Comments

@nicojs
Copy link
Member

nicojs commented Aug 5, 2020

Is your feature request related to a problem? Please describe.
Pre-mutation switching, we decided to add sandboxFileNames to the run options. The idea is that a test runner could use these files to clear node's require cache. However, this cannot be trusted post-mutation switching. A buildCommand is generally used to transpile the original sandbox files which are then required by a test run.

The Jasmine test runner uses these now.

Describe the solution you'd like

  1. Refactor jasmine test runner to not use the sandbox files (same implementation as in the mocha runner).
  2. (maybe?) add an e2e test for jasmine in combination with the build command setting
  3. Remove sandboxFileNames from the test runner dependency injection values.
@nicojs nicojs added the 🚀 Feature request New feature request label Aug 5, 2020
@nicojs nicojs added this to the 4.0 milestone Aug 5, 2020
nicojs added a commit that referenced this issue Aug 11, 2020
…2369)

Remove `sandboxFileNames` as injectable value for test runner plugins. Test runner plugins are expected to do their own file discovery in the current working directory. The list of sandbox files that Stryker internally copied over might differ from the list of files in the sandbox, because the user might have configured a `buildCommand` that compiled the files to their final representation.

* Remove `sandboxFileNames` from dependency injection context
* Rename `OptionsContext` to `PluginContext` and remove the `PluginContexts` mapped type (no longer needed)
* Move generic require cache clean functionality to `@stryker-mutator/util` 
    * Use this in the mocha-runner 
    * Use this in the jasmine-runner.

Fixed #2351
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

Successfully merging a pull request may close this issue.

1 participant