Skip to content

Commit c09334f

Browse files
committed
(#13) Updated timing for poll-action test
1 parent 500d0d3 commit c09334f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/util/poll-action.function.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ describe("poll-action", () => {
8585
// GIVEN
8686
const updateInterval = 200;
8787
const maxDuration = 1000;
88-
const delay = 2.2 * updateInterval;
88+
const delay = 2.5 * updateInterval;
89+
const start = Date.now();
8990
const action = jest.fn(() => {
9091
const interval = (Date.now() - start);
9192
return new Promise<boolean>((resolve, reject) => (interval > delay) ? resolve(true) : reject());
9293
});
9394

9495
// WHEN
95-
const start = Date.now();
9696
await timeout(updateInterval, maxDuration, action);
9797
const end = Date.now();
9898

0 commit comments

Comments
 (0)