From 3b5027af3d577d0be1ebb9a8567602bc0c1a0ed0 Mon Sep 17 00:00:00 2001
From: Jacopo Farina <jacopo.farina@flixbus.com>
Date: Tue, 20 Nov 2018 12:32:38 +0100
Subject: [PATCH] Switch to mocha-headless-chrome

---
 package.json  | 6 +++---
 tests/test.js | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/package.json b/package.json
index 5e36473..012c66e 100644
--- a/package.json
+++ b/package.json
@@ -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 @@
 	"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"
 	}
 }
diff --git a/tests/test.js b/tests/test.js
index 5292d5f..2741831 100644
--- a/tests/test.js
+++ b/tests/test.js
@@ -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();