Skip to content

Commit

Permalink
fix: remove debug output from internal tools
Browse files Browse the repository at this point in the history
  • Loading branch information
hugomrdias committed Jul 13, 2021
1 parent 5462363 commit 7f08409
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import mergeOptions from 'merge-options'
import { fileURLToPath } from 'node:url'

const __dirname = path.dirname(fileURLToPath(import.meta.url))

const merge = mergeOptions.bind({ ignoreUndefined: true })

/**
Expand Down Expand Up @@ -80,6 +79,8 @@ export class Runner {
if (this.tests.length === 0) {
this.stop(false, 'No test files were found.')
}

process.env.DEBUG += ',-pw:*'
}

async launch() {
Expand Down Expand Up @@ -212,7 +213,9 @@ export class Runner {
*/
async runTests(page, file) {
await page.addScriptTag({ url: 'setup.js' })
await page.evaluate(`localStorage.debug = "${this.env.DEBUG}"`)
await page.evaluate(
`localStorage.debug = "${this.env.DEBUG},-pw:*,-mocha:*"`
)

switch (this.options.mode) {
case 'main': {
Expand Down

0 comments on commit 7f08409

Please sign in to comment.