-
-
Notifications
You must be signed in to change notification settings - Fork 771
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
Test suite is not re-runnable using --watch
due to keeping state
#2502
Comments
fatso83
added a commit
that referenced
this issue
Mar 24, 2023
fatso83
added a commit
that referenced
this issue
Mar 26, 2023
fatso83
added a commit
to sinonjs/samsam
that referenced
this issue
Mar 26, 2023
fatso83
added a commit
that referenced
this issue
Mar 26, 2023
* fix: do not modify the Function prototype when running tests Made a single test fail as the Function prototype had been mutated by a later test in the test suite. refs #2502 * fix: do not mutate matcher object message This made 3 of the assertion tests fail when re-running as Sinon's spy formatter changed the exports of the samsam module * Use latest version of samsam to get immutable messages Ensure we cannot do the same mistake again
Was closed in #2504 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When using the
--watch
option of Mocha the tests start failing on any changeTo Reproduce
Steps to reproduce the behavior:
npx mocha --watch test
Expected behavior
Immutable, non-failing test runs with no shared global state.
Context (please complete the following information):
Additional context
This is due to two things that I could see
Function
in https://github.com/sinonjs/sinon/pull/1968/files#diff-ebffa5a039be75d22925d266e16de1f0dbf14a625e5998bb0982e8523ce791c9R1332-R1337The text was updated successfully, but these errors were encountered: