tests(ui): add wiggle room to timeout tests

This commit is contained in:
psychedelicious
2025-07-08 12:53:03 +10:00
parent 56857fbbe6
commit e37665ff59

View File

@@ -413,8 +413,10 @@ describe('AppNavigationApi', () => {
await expect(waitPromise).rejects.toThrow('Panel generate:settings registration timed out after 200ms');
const elapsed = Date.now() - start;
expect(elapsed).toBeGreaterThanOrEqual(200);
expect(elapsed).toBeLessThan(300); // Allow some margin
// TODO(psyche): Use vitest's fake timeres
// Allow some margin for timer resolution
expect(elapsed).toBeGreaterThanOrEqual(190);
expect(elapsed).toBeLessThan(210);
});
});