Merge pull request #32633 from overleaf/ab-fix-flaky-project-getter-test

[web] Fix flaky ProjectGetter test (existUsersDebugProjectsOlderThan)

GitOrigin-RevId: 6963720fc06507425d3c9a44aeaa3d7b2e305d43
This commit is contained in:
Alexandre Bourdin
2026-04-07 15:41:02 +02:00
committed by Copybot
parent 2d9fc99274
commit bf41ecdb39

View File

@@ -396,6 +396,14 @@ describe('ProjectGetter', function () {
})
describe('existUsersDebugProjectsOlderThan', function () {
beforeEach(function () {
vi.useFakeTimers()
})
afterEach(function () {
vi.useRealTimers()
})
it('should check for existence of debug projects older than given days', async function (ctx) {
const days = 10
const cutoffDate = new Date(Date.now() - days * 24 * 60 * 60 * 1000)