Skip to content

Commit

Permalink
Deletes all .log files before tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Miraeld committed Mar 28, 2024
1 parent cafad83 commit 9add1ab
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/support/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,8 @@ setDefaultTimeout(process.env.PWDEBUG ? -1 : 60 * 10000);
* Before all tests, launches the Chromium browser.
*/
BeforeAll(async function (this: ICustomWorld) {
const debugLogPath = `${WP_SSH_ROOT_DIR}wp-content/debug.log`;
const debugLogExists = await exists(debugLogPath);

if (debugLogExists) {
await rm(debugLogPath);
}
const debugLogPath = `${WP_SSH_ROOT_DIR}wp-content/*.log`;
await rm(debugLogPath);

await deleteFolder('./backstop_data/bitmaps_test');
browser = await chromium.launch({ headless: false });
Expand Down

0 comments on commit 9add1ab

Please sign in to comment.