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:
parent
38652a4638
commit
94f7907b55
1 changed files with 1 additions and 1 deletions
|
|
@ -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 */)
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue