Introduce yarn debug-unit
command
The command runs the puppeteer testsuite with the '--inspect-brk' node flag. This makes it possible to connect to the testsuite with Chrome DevTools and debug it. Fixes #57.
This commit is contained in:
parent
193f0d85cb
commit
a0eeb415f2
@ -8,6 +8,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"unit": "jasmine test/test.js",
|
"unit": "jasmine test/test.js",
|
||||||
|
"debug-unit": "DEBUG_TEST=true node --inspect-brk ./node_modules/.bin/jasmine test/test.js",
|
||||||
"test-phantom": "python third_party/phantomjs/test/run-tests.py",
|
"test-phantom": "python third_party/phantomjs/test/run-tests.py",
|
||||||
"test": "npm run lint --silent && npm run unit && npm run test-phantom",
|
"test": "npm run lint --silent && npm run unit && npm run test-phantom",
|
||||||
"install": "node install.js",
|
"install": "node install.js",
|
||||||
|
@ -23,7 +23,10 @@ let PORT = 8907;
|
|||||||
let STATIC_PREFIX = 'http://localhost:' + PORT;
|
let STATIC_PREFIX = 'http://localhost:' + PORT;
|
||||||
let EMPTY_PAGE = STATIC_PREFIX + '/empty.html';
|
let EMPTY_PAGE = STATIC_PREFIX + '/empty.html';
|
||||||
|
|
||||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10 * 1000;
|
if (process.env.DEBUG_TEST)
|
||||||
|
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 1000 * 1000;
|
||||||
|
else
|
||||||
|
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10 * 1000;
|
||||||
|
|
||||||
describe('Puppeteer', function() {
|
describe('Puppeteer', function() {
|
||||||
let browser;
|
let browser;
|
||||||
|
Loading…
Reference in New Issue
Block a user