Skip to content

Commit

Permalink
Move line disabling no-await-in-loop rule
Browse files Browse the repository at this point in the history
  • Loading branch information
taneliang committed Feb 18, 2018
1 parent c2f3ad8 commit f424811
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion www/src/js/test-utils/async.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export const nextTick = util.promisify(process.nextTick);
* components that have async actions, such as making network requests
*/
export async function waitFor(condition: () => boolean, intervalInMs: number = 5) {
// eslint-disable-next-line no-await-in-loop
while (!condition()) {
// eslint-disable-next-line no-await-in-loop
await new Promise((resolve) => setTimeout(resolve, intervalInMs));
}
}

0 comments on commit f424811

Please sign in to comment.