Skip to content

Commit

Permalink
fix(jest): use real timer for automatic check
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanraj-r committed Jun 24, 2021
1 parent 0950925 commit 597c89e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/jest/src/automatic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ export async function automaticCheck(opts: AutoCheckOpts = defaultAutoCheckOpts)
// Create a DOM walker filtering only elements (skipping text, comment nodes etc)
const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT);
let currNode = walker.firstChild();
// Using fake timer results in async timeout issue with axe
jest.useRealTimers();
try {
while (currNode !== null) {
// TODO (spike): Use a logger lib with log levels selectable at runtime
Expand Down

0 comments on commit 597c89e

Please sign in to comment.