mirror of
https://github.com/hanzoai/tailwindcss.git
synced 2026-09-24 17:03:14 +00:00
add margin of error to the test
Sometimes this is flaky on CI, even though it doesn't make any sense because we use `setTimeout(_, 500)` which should _at least_ result in 500ms... But sometimes this results into: ``` AssertionError: expected 499.76 to be greater than or equal to 500 ```
This commit is contained in:
@@ -83,7 +83,7 @@ it('should measure async callbacks via the `span` api', async () => {
|
||||
`)
|
||||
|
||||
let [, duration] = stripVTControlCharacters(output).match(/\[(.*)\]/)!
|
||||
expect(parseFloat(duration)).toBeGreaterThanOrEqual(500)
|
||||
expect(parseFloat(duration)).toBeGreaterThanOrEqual(500 - 2 /* Margin of error */)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user