Browse Source

Switch to mocha-headless-chrome

pull/581/head^2
Jacopo Farina 7 years ago
parent
commit
3b5027af3d
No known key found for this signature in database
GPG Key ID: B5D5815CC2AF4247
  1. 6
      package.json
  2. 4
      tests/test.js

6
package.json

@ -42,7 +42,7 @@ @@ -42,7 +42,7 @@
"grunt": "^1.0.2",
"grunt-contrib-uglify": "^3.3.0",
"mocha": "^5.2.0",
"mocha-chrome": "^1.1.0",
"mocha-headless-chrome": "^2.0.1",
"open": "0.0.5",
"phantomjs-prebuilt": "^2.1.16",
"serve-static": "^1.7.1"
@ -50,8 +50,8 @@ @@ -50,8 +50,8 @@
"scripts": {
"lint": "eslint --no-ignore papaparse.js Gruntfile.js .eslintrc.js 'tests/**/*.js'",
"test-browser": "node tests/test.js",
"test-mocha-chrome": "node tests/test.js --mocha-chrome",
"test-mocha-headless-chrome": "node tests/test.js --mocha-headless-chrome",
"test-node": "mocha tests/node-tests.js tests/test-cases.js",
"test": "npm run lint && npm run test-node && npm run test-mocha-chrome"
"test": "npm run lint && npm run test-node && npm run test-mocha-headless-chrome"
}
}

4
tests/test.js

@ -5,8 +5,8 @@ var path = require('path'); @@ -5,8 +5,8 @@ var path = require('path');
var childProcess = require('child_process');
var server = connect().use(serveStatic(path.join(__dirname, '/..'))).listen(8071, function() {
if (process.argv.indexOf('--mocha-chrome') !== -1) {
childProcess.spawn('node_modules/.bin/mocha-chrome', ['http://localhost:8071/tests/tests.html'], {
if (process.argv.indexOf('--mocha-headless-chrome') !== -1) {
childProcess.spawn('node_modules/.bin/mocha-headless-chrome', ['-f', 'http://localhost:8071/tests/tests.html'], {
stdio: 'inherit'
}).on('exit', function(code) {
server.close();

Loading…
Cancel
Save