Browse Source

Forward the exit code from phantom to the npm script. (#523)

pull/540/head
Adi Roiban 7 years ago committed by Sergi Almacellas Abellana
parent
commit
6ef8865a7c
  1. 3
      tests/test.js

3
tests/test.js

@ -8,8 +8,9 @@ var server = connect().use(serveStatic(path.join(__dirname, '/..'))).listen(8071
if (process.argv.indexOf('--phantomjs') !== -1) { if (process.argv.indexOf('--phantomjs') !== -1) {
childProcess.spawn('node_modules/.bin/mocha-phantomjs', ['http://localhost:8071/tests/tests.html'], { childProcess.spawn('node_modules/.bin/mocha-phantomjs', ['http://localhost:8071/tests/tests.html'], {
stdio: 'inherit' stdio: 'inherit'
}).on('exit', function() { }).on('exit', function(code) {
server.close(); server.close();
process.exit(code); // eslint-disable-line no-process-exit
}); });
} else { } else {

Loading…
Cancel
Save