Pass mocha grep command line option through to spec app

This commit is contained in:
Kevin Sawicki 2015-12-10 10:33:43 -08:00
parent a42fa5d5c2
commit 69c0a33c85

View file

@ -5,6 +5,12 @@ const dialog = electron.dialog;
const BrowserWindow = electron.BrowserWindow;
const path = require('path');
const url = require('url');
var argv = require('yargs')
.boolean('ci')
.string('g').alias('g', 'grep')
.argv;
var window = null;
process.port = 0; // will be used by crash-reporter spec.
@ -68,7 +74,13 @@ app.on('ready', function() {
javascript: true // Test whether web-preferences crashes.
},
});
window.loadURL('file://' + __dirname + '/index.html');
window.loadURL(url.format({
pathname: __dirname + '/index.html',
protocol: 'file',
query: {
grep: argv.grep
}
}));
window.on('unresponsive', function() {
var chosen = dialog.showMessageBox(window, {
type: 'warning',