File tree 1 file changed +2
-5
lines changed
1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -50,11 +50,8 @@ test('times out after 1000ms by default', async () => {
50
50
) . rejects . toThrowErrorMatchingInlineSnapshot (
51
51
`Timed out in waitForElementToBeRemoved.` ,
52
52
)
53
- // NOTE: this assertion ensures that the timeout runs in the declared (fake) clock
54
- // while in real time the time was only a fraction since the real clock is only bound by the CPU
55
- // So 10ms is really just an approximation on how long the CPU needs to execute our code.
56
- // If people want to timeout in real time they should rely on their test runners.
57
- expect ( performance . now ( ) - start ) . toBeLessThanOrEqual ( 10 )
53
+ // NOTE: this assertion ensures that the timeout runs in the declared (fake) clock.
54
+ expect ( performance . now ( ) - start ) . toBeGreaterThanOrEqual ( 1000 )
58
55
} )
59
56
60
57
test ( 'recursive timers do not cause issues' , async ( ) => {
You can’t perform that action at this time.
0 commit comments