Skip to content

Commit

Permalink
fix: Updating grunt-karma to use the new API interface from Karma
Browse files Browse the repository at this point in the history
  • Loading branch information
luis-almeida committed Jul 16, 2015
1 parent 2e33b66 commit 5d1881c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion lib/background.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var server = require('karma').server
var Server = require('karma').Server
var data = JSON.parse(process.argv[2])
var server = new Server(data)

server.start(data)
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
"grunt-conventional-changelog": "~1.2.2",
"grunt-eslint": "^13.0.0",
"grunt-npm": "0.0.2",
"karma": "~0.12.0",
"karma": "~0.13.0",
"karma-chrome-launcher": "~0.1.2",
"karma-firefox-launcher": "~0.1.3",
"karma-mocha": "~0.1.3",
"load-grunt-tasks": "^3.2.0"
},
"peerDependencies": {
"grunt": "0.4.x",
"karma": "^0.12 || >= 0.13.0-rc.0"
"karma": "^0.13.0 || >= 0.14.0-rc.0"
},
"contributors": [
"Dave Geddes <davidcgeddes@gmail.com>",
Expand Down
5 changes: 3 additions & 2 deletions tasks/grunt-karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

var runner = require('karma').runner
var server = require('karma').server
var Server = require('karma').Server
var path = require('path')
var _ = require('lodash')

Expand Down Expand Up @@ -129,7 +129,8 @@ module.exports = function (grunt) {

done()
} else {
server.start(data, finished.bind(done))
var server = new Server(data, finished.bind(done))
server.start()
}
})
}

3 comments on commit 5d1881c

@SomethingSexy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying this out last night as well, were you getting the following warning?

Cannot read property 'mtime' of undefined.

@dignifiedquire
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SomethingSexy Sounds like karma-runner/karma#1494, any info you have on this, I much appreciate it

@SomethingSexy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya it looks like that issue. I am still digging in. This are the karma specific dependencies I am running now

"grunt-karma": "~0.12.0",
"karma-coverage": "~0.4.2",
"karma-requirejs": "~0.2.2",
"karma-phantomjs-launcher": "~0.2.0",
"karma-chrome-launcher": "~0.2.0",
"karma-qunit": "~0.1.4"
"karma-jasmine": "~0.3.6",

I am also running via requirejs as well (although maybe that as obvious :) )

Please sign in to comment.