Skip to content

Commit

Permalink
feat: add config
Browse files Browse the repository at this point in the history
  • Loading branch information
electroluxcode committed Jul 15, 2024
1 parent e6346f7 commit 5cda1a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/__tests__/fake-timers.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ test('times out after 1000ms by default', async () => {
jest.useRealTimers()
// NOTE: this assertion ensures that the timeout runs in the declared (fake) clock
// while in real time the time was only a fraction since the real clock is only bound by the CPU.
// So 20ms is really just an approximation on how long the CPU needs to execute our code.
// So 80ms is really just an approximation on how long the CPU needs to execute our code.
// If people want to timeout in real time they should rely on their test runners.
expect(performance.now() - startReal).toBeLessThanOrEqual(20)
expect(performance.now() - startReal).toBeLessThanOrEqual(80)
})

test('recursive timers do not cause issues', async () => {
Expand Down

0 comments on commit 5cda1a3

Please sign in to comment.