Commit ebf3b6c
committed
fix(ahrefs-client): drop redundant sinon.restore() in afterEach
In sinon 21.1.x, the static sinon.restore() also uninstalls fake timers
installed via a custom sandbox (sandbox.useFakeTimers). The ahrefs-client
test installs the clock once in `before` and called `sinon.restore()` in
`afterEach`, which uninstalled the clock after the first test under sinon
21.1.x. Subsequent tests got real `new Date()`, breaking 10 tests on
Nock URL matches and fullAuditRef assertions.
The call was unnecessary: this test only uses sandbox.useFakeTimers and
never creates any static-sinon stubs, so it was a no-op in 21.0.3 and
harmful in 21.1.x.1 parent 04492ce commit ebf3b6c
1 file changed
Lines changed: 0 additions & 1 deletion
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
208 | 207 | | |
209 | 208 | | |
210 | 209 | | |
| |||
0 commit comments