Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
aslushnikov committed Sep 9, 2020
1 parent f4d7d1c commit a43c63b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/installation-tests/screencast.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,19 @@ const fs = require('fs');
});
const page = await context.newPage();
const video = await page.waitForEvent('_videostarted');
// Wait fo 1 second to actually record something.
await new Promise(x => setTimeout(x, 1000));
const [videoFile] = await Promise.all([
video.path(),
context.close(),
]);
await browser.close();
if (!fs.existsSync(videoFile)) {
console.error(`Package "${requireName}", browser "${browserType}" should have created screencast!`);
console.error(`ERROR: Package "${requireName}", browser "${browserType}" should have created screencast!`);
process.exit(1);
}
} catch (err) {
console.error(`Should be able to launch ${browserType} from ${requireName}`);
console.error(`ERROR: Should be able to launch ${browserType} from ${requireName}`);
console.error(err);
process.exit(1);
}
Expand Down

0 comments on commit a43c63b

Please sign in to comment.