diff --git a/lib/runner.js b/lib/runner.js index d34db61..89970ef 100644 --- a/lib/runner.js +++ b/lib/runner.js @@ -20,6 +20,7 @@ exports.run = function (targets, root, sources) { exec = require('child_process').exec, MOCHA_PHANTOM_BIN = require.resolve('.bin/mocha-phantomjs' + (isWinOS ? '.cmd' : '')), MOCHA_PHANTOM_REPORTER = process.env.MOCHA_PHANTOM_REPORTER || 'spec', + MOCHA_PHANTOM_ARGS = process.env.MOCHA_PHANTOM_ARGS, MOCHA_PHANTOM_MAX_COUNT = parseInt(process.env.MOCHA_PHANTOM_MAX_COUNT, 10) || 10, MOCHA_PHANTOM_HOOK = path.resolve(__dirname, './hooks/mocha-phantomjs.js'), phantomCount = 0, @@ -46,7 +47,7 @@ exports.run = function (targets, root, sources) { target = nodeName + '.html', targetPath = path.join(nodePath, target), fullpath = path.join(root, nodePath, target), - args = '--reporter ' + MOCHA_PHANTOM_REPORTER, + args = MOCHA_PHANTOM_ARGS ? MOCHA_PHANTOM_ARGS : '--reporter ' + MOCHA_PHANTOM_REPORTER, fileurl = url.format({ protocol: 'file', host: '/',