Skip to content

Commit

Permalink
Attempt at fixing failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
adams85 committed Jul 25, 2023
1 parent 376d3bf commit f17ecf2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/ConfigCatClientTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ describe("ConfigCatClient", () => {
const actualValue = await client.getValueAsync("debug", false);
const ellapsedMilliseconds: number = new Date().getTime() - startDate;

assert.isAtLeast(ellapsedMilliseconds, maxInitWaitTimeSeconds);
assert.isAtLeast(ellapsedMilliseconds, (maxInitWaitTimeSeconds * 1000) - 5); // JS timers and/or getTime() doesn't seem too precise...
assert.isAtMost(ellapsedMilliseconds, (maxInitWaitTimeSeconds * 1000) + 50); // 50 ms for tolerance
assert.equal(actualValue, false);
});
Expand Down

0 comments on commit f17ecf2

Please sign in to comment.