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 13, 2016
1 parent 17b9c98 commit 8b5f5e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ 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
Expand Down
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 8b5f5e5

Please sign in to comment.