Commit b775f1b
authored
Avoid tampering with globals and other modules' exports in tests (#2504)
* 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 again1 parent 477064b commit b775f1b
File tree
5 files changed
+60
-15
lines changed- lib/sinon
- test
5 files changed
+60
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | | - | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | | - | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
176 | 177 | | |
177 | 178 | | |
178 | 179 | | |
| |||
1535 | 1536 | | |
1536 | 1537 | | |
1537 | 1538 | | |
1538 | | - | |
1539 | | - | |
1540 | | - | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
1541 | 1546 | | |
1542 | 1547 | | |
1543 | 1548 | | |
1544 | | - | |
1545 | | - | |
1546 | | - | |
1547 | | - | |
1548 | 1549 | | |
1549 | 1550 | | |
1550 | 1551 | | |
| |||
0 commit comments