Closed johnjiang closed 3 years ago
Describe the bug When I use a predicate with a timeout and interval, an exception is correctly thrown after the timeout but the predicate is still being executed.
To Reproduce https://codesandbox.io/s/vigilant-dust-c3119?file=/src/index.js
import { waitUntil } from "async-wait-until"; (() => { waitUntil( () => { console.log("Trying"); return Promise.resolve(false); }, { timeout: 1000, intervalBetweenAttempts: 100 } ); })();
Expected behavior Exception is thrown and the predicate no longer runs. However, the exception is thrown but the predicate is still being executed
Thanks for reporting @johnjiang! I'll publish the fix shortly.
Thanks for fixing it so quickly!
No worries!
Describe the bug When I use a predicate with a timeout and interval, an exception is correctly thrown after the timeout but the predicate is still being executed.
To Reproduce https://codesandbox.io/s/vigilant-dust-c3119?file=/src/index.js
Expected behavior Exception is thrown and the predicate no longer runs. However, the exception is thrown but the predicate is still being executed