karma-runner / karma-runner/karma
When running on Travis, Karma reports 0 of N tests executed
- Dominant language
- JavaScript
- Stars
- 12k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to make my Karma/Angular tests work on Travis as described [here](http://karma-runner.github.io/0.8/plus/Travis-CI.html), but it keeps saying that 0 tests were executed:
```
Running "karma:test" (karma) task
INFO [karma]: Karma v0.12.31 server started at http://localhost:9876/
INFO [launcher]: Starting browser Firefox
INFO [Firefox 31.0.0 (Linux)]: Connected on socket C7AVrV2cfPpQquGp3ew4 with id 60880131
Firefox 31.0.0 (Linux): Executed 0 of 4 SUCCESS (0 secs / 0 secs)
```
There's no such issue when I run the same thing locally, it reports "4 of 4". There's also a [blog post](http://swizec.com/blog/how-to-run-javascript-tests-in-chrome-on-travis/swizec/6647) by @Swizec where eventually the same result described: "Executed 0 of 114 SUCCESS" (there's a screenshot at the very end).
Here's my set up:
##### .travis.yml
``` yaml
language: node_js
node_js:
- '0.11'
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
```
##### karma.conf.js
``` js
module.exports = function(config) {
var c = {
basePath: './',
files: [...],
autoWatch: true,
frameworks: ['jasmine'],
browsers: ['Firefox'],
plugins: [
'karma-firefox-launcher',
'karma-jasmine'
]
};
config.set(c);
};
```
##### Gruntfile.js
``` js
module.exports = function(grunt) {
grunt.initConfig({
...
karma: {
options: {
configFile: 'karma.conf.js'
},
'test': {
singleRun: true
}
},
...
});
...
grunt.loadNpmTasks("grunt-karma");
...
...
grunt.registerTask("fe-test", ["karma:test"]);
...
};
```
Did I miss something?
Contributor guide
Assessment
This issue has not been assessed yet.