Skip to content

Commit

Permalink
Sinon fake timers in before each and after each to avoid collision wi…
Browse files Browse the repository at this point in the history
…th other tests

Issue: CLDSRV-408
  • Loading branch information
KillianG authored Jun 28, 2023
1 parent 33382bf commit 4cdeeca
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/unit/api/apiUtils/versioning.js
Original file line number Diff line number Diff line change
Expand Up @@ -621,12 +621,20 @@ describe('versioning helpers', () => {
});

describe('overwritingVersioning', () => {
sinon.useFakeTimers();
const days = 3;
const now = Date.now();
const archiveInfo = {
'archiveID': '126783123678',
};
const now = Date.now();
let clock;

beforeEach(() => {
clock = sinon.useFakeTimers(now);
});

afterEach(() => {
clock.restore();
});

[
{
Expand Down

0 comments on commit 4cdeeca

Please sign in to comment.