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

Code coverage reset when re-loading module #1168

Open
rhpijnacker opened this issue Jul 6, 2020 · 1 comment
Open

Code coverage reset when re-loading module #1168

rhpijnacker opened this issue Jul 6, 2020 · 1 comment
Labels
needs-verification Needs to be verified

Comments

@rhpijnacker
Copy link
Contributor

Since upgrading from Intern 3 to Intern 4 we have a number of files that have (much) lower code coverage.

I've been able to chase this down to test cases that use a (dojo) context require with a map to reroute dependencies to mock files. After the test case is finished, we clean up the loaded module (using require.undef) to force-load it (without mocked dependencies) the next time it is needed.

It seems that reloading a module with Intern 4 resets the coverage built up so far, whereas with Intern 3 this wasn't the case.

@github-actions github-actions bot added the needs-verification Needs to be verified label Jul 6, 2020
rhpijnacker pushed a commit to rhpijnacker/intern-issue-1168 that referenced this issue Jul 6, 2020
@rhpijnacker
Copy link
Contributor Author

See https://github.com/rhpijnacker/intern-issue-1168 for a repro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-verification Needs to be verified
Projects
None yet
Development

No branches or pull requests

1 participant