Skip to content

Commit

Permalink
fix: ensure karma.config is passed (karma-runner#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
segrey committed May 25, 2018
1 parent 6c63662 commit ed11ff0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions src/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,11 @@ var createMochaReporterConstructor = function (tc, pathname) {
}
}
/* eslint-disable no-unused-vars */
var createMochaStartFn = function (mocha) {
var createMochaStartFn = function (karma, mocha) {
/* eslint-enable no-unused-vars */
return function (config) {
var clientArguments
config = config || {}
clientArguments = config.args
return function () {
var config = karma.config || {}
var clientArguments = config.args

if (clientArguments) {
if (Object.prototype.toString.call(clientArguments) === '[object Array]') {
Expand Down
2 changes: 1 addition & 1 deletion src/adapter.wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

%CONTENT%

window.__karma__.start = createMochaStartFn(window.mocha)
window.__karma__.start = createMochaStartFn(window.__karma__, window.mocha)
window.mocha.setup(createConfigObject(window.__karma__))
})(window)

0 comments on commit ed11ff0

Please sign in to comment.