Skip to content

Commit

Permalink
Add --debug flag for browser tests
Browse files Browse the repository at this point in the history
  • Loading branch information
codenirvana committed Jun 23, 2020
1 parent aa2c392 commit 209c6cb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,9 @@ The following section outlines the API available inside sandbox scripts
- execution.response.*
- execution.cookies.*
- execution.console.*

## Contributing

### Debug in browser

To debug tests in Chrome's DevTools, start tests using `npm run test-browser -- --debug` and click `DEBUG`.
6 changes: 6 additions & 0 deletions test/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,11 @@ module.exports = function (config) {
configuration.browsers = ['chromeTravis'];
}

// Use `npm run test-browser -- --debug` to debug tests in Chrome console
if (process.argv[2] === '--debug') {
configuration.browsers = ['Chrome'];
configuration.singleRun = false;
}

config.set(configuration);
};

0 comments on commit 209c6cb

Please sign in to comment.