Fix flaky getMinDurationFromAST test
Adds a bit of leeway so that the test won't fail due to tolerable floating point inaccuracies.pull/11425/head
parent
1abae7df0d
commit
8781ce8357
|
@ -1769,6 +1769,8 @@ export const AST_TESTS = [
|
|||
|
||||
describe('getMinDurationFromAST', () => {
|
||||
test.each(AST_TESTS)('%s:\n\n```\n%s\n```', (__, ___, expected, ast) => {
|
||||
expect(getMinDurationFromAST(ast)).toEqual(expected)
|
||||
const actual = getMinDurationFromAST(ast)
|
||||
|
||||
expect(Math.abs(actual - expected)).toBeLessThan(5)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue