Skip to content

Commit

Permalink
chore: disable e2e debugging code
Browse files Browse the repository at this point in the history
  • Loading branch information
tihuan committed Sep 21, 2021
1 parent 47b206a commit 5b31097
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions client/__tests__/e2e/screenshot_env.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ const takeScreenshot = require("./takeScreenshot");

class ScreenshotEnvironment extends PuppeteerEnvironment {
async handleTestEvent(event, state) {
// (thuang): Enable this when debugging a flaky test, since this provides
// the context around the flaky test, which is helpful for debugging.
// if (["test_start", "test_done"].includes(event.name)) {
// console.log("------------------event name:\n", event.name);
// console.log("~~~~ Current test errors\n", new Date(), event.test.errors);
// console.log("~~~~ Current test\n", new Date(), event.test);
// }

if (event.name === "error") {
console.log("error event:", JSON.stringify(event));
}
Expand Down

0 comments on commit 5b31097

Please sign in to comment.