Skip to content

Commit

Permalink
unflake test?
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Jul 20, 2023
1 parent ee8b138 commit da0d42a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import * as path from 'path';
import * as childProcess from 'child_process';
import { promisify } from 'util';

const exec = promisify(childProcess.exec);

async function run(): Promise<void> {
let testPaths: string[] = [];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ document.dispatchEvent(new Event('visibilitychange'));`);
expect(counter).toBe(0);

// Now wait for 2s until min duration is reached, and try again
await new Promise(resolve => setTimeout(resolve, MIN_DURATION));
await new Promise(resolve => setTimeout(resolve, MIN_DURATION + 100));
await page.evaluate(`Object.defineProperty(document, 'visibilityState', {
configurable: true,
get: function () {
Expand Down

0 comments on commit da0d42a

Please sign in to comment.