migrate sinonjs/fake-timers
This commit is contained in:
parent
ac61d49873
commit
deebcb29da
|
@ -104,6 +104,8 @@ describe('RoleService', () => {
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
clock = lolex.install({
|
clock = lolex.install({
|
||||||
|
// https://github.com/sinonjs/sinon/issues/2620
|
||||||
|
toFake: Object.keys(lolex.timers).filter((key) => !['nextTick', 'queueMicrotask'].includes(key)) as lolex.FakeMethod[],
|
||||||
now: new Date(),
|
now: new Date(),
|
||||||
shouldClearNativeTimers: true,
|
shouldClearNativeTimers: true,
|
||||||
});
|
});
|
||||||
|
|
|
@ -71,6 +71,8 @@ describe('Chart', () => {
|
||||||
testIntersectionChart = new TestIntersectionChart(db, redisClient, logger);
|
testIntersectionChart = new TestIntersectionChart(db, redisClient, logger);
|
||||||
|
|
||||||
clock = lolex.install({
|
clock = lolex.install({
|
||||||
|
// https://github.com/sinonjs/sinon/issues/2620
|
||||||
|
toFake: Object.keys(lolex.timers).filter((key) => !['nextTick', 'queueMicrotask'].includes(key)) as lolex.FakeMethod[],
|
||||||
now: new Date(Date.UTC(2000, 0, 1, 0, 0, 0)),
|
now: new Date(Date.UTC(2000, 0, 1, 0, 0, 0)),
|
||||||
shouldClearNativeTimers: true,
|
shouldClearNativeTimers: true,
|
||||||
});
|
});
|
||||||
|
|
|
@ -141,6 +141,8 @@ describe('CheckModeratorsActivityProcessorService', () => {
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
clock = lolex.install({
|
clock = lolex.install({
|
||||||
|
// https://github.com/sinonjs/sinon/issues/2620
|
||||||
|
toFake: Object.keys(lolex.timers).filter((key) => !['nextTick', 'queueMicrotask'].includes(key)) as lolex.FakeMethod[],
|
||||||
now: new Date(baseDate),
|
now: new Date(baseDate),
|
||||||
shouldClearNativeTimers: true,
|
shouldClearNativeTimers: true,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue