Skip to content

Commit ebf3b6c

Browse files
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

packages/spacecat-shared-ahrefs-client/test/index.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ describe('AhrefsAPIClient', () => {
204204
});
205205

206206
afterEach(() => {
207-
sinon.restore();
208207
nock.cleanAll();
209208
});
210209

0 commit comments

Comments
 (0)