Skip to content

Commit

Permalink
fix: Setting default value for config in runner and stopper
Browse files Browse the repository at this point in the history
Default config to empty Object if undefined.
  • Loading branch information
budde377 committed Feb 21, 2016
1 parent f10fd81 commit 414db89
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ var parseExitCode = function (buffer, defaultCode, failOnEmptyTestSuite) {

// TODO(vojta): read config file (port, host, urlRoot)
exports.run = function (config, done) {
config = config || {}

logger.setupFromConfig(config)

done = helper.isFunction(done) ? done : process.exit
config = cfg.parseConfig(config.configFile, config)

Expand Down Expand Up @@ -71,6 +75,7 @@ exports.run = function (config, done) {
removedFiles: config.removedFiles,
changedFiles: config.changedFiles,
addedFiles: config.addedFiles,
refresh: config.refresh
refresh: config.refresh,
colors: config.colors
}))
}
1 change: 1 addition & 0 deletions lib/stopper.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ var logger = require('./logger')
var helper = require('./helper')

exports.stop = function (config, done) {
config = config || {}
logger.setupFromConfig(config)
done = helper.isFunction(done) ? done : process.exit
var log = logger.create('stopper')
Expand Down

0 comments on commit 414db89

Please sign in to comment.