karma: Getting "Executed 0 of 0 ERROR" in the console
Hi all,
I’m trying to use karma with jasmine-flight and require.js.
I have no tests in place, just want to get a normal “0 of 0 SUCESS” before getting started.
However this is ERROR is shown in my console:
INFO [karma]: Karma v0.10.2 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 29.0.1547 (Mac OS X 10.8.5)]: Connected on socket YRMSwebi_lNtEYDnL0rk
Chrome 29.0.1547 (Mac OS X 10.8.5): Executed 0 of 0 ERROR (0.171 secs / 0 secs)
I have found similar issues but related to “Angular” not “Flight”.
This is my karma.conf:
// Karma configuration
// Generated on Thu Sep 19 2013 16:31:19 GMT+0200 (CEST)
module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '',
// frameworks to use
frameworks: ['requirejs', 'jasmine'],
// list of files / patterns to load in the browser
files: [
'../bower_components/jasmine-flight/lib/jasmine-flight.js',
'../bower_components/jasmine-jquery/lib/jasmine-jquery.js',
{pattern: '*.js', included: false},
{pattern: 'mixins/*.js', included: false},
{pattern: 'data/*.js', included: false},
{pattern: 'pages/*.js', included: false},
{pattern: 'ui/**/*.js', included: false},
{pattern: 'tests/spec/**/*.spec.js', included: false},
// Entry point for karma.
'tests/test-main.js'
],
// list of files to exclude
exclude: [
'../bower_components/flight/lib/standalone/*.js'
],
// test results reporter to use
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
reporters: ['dots'],
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers: ['Chrome'],
// If browser does not capture in given timeout [ms], kill it
captureTimeout: 5000,
// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun: false,
// report which specs are slower than 500ms
// CLI --report-slower-than 500
reportSlowerThan: 500,
plugins: [
'karma-jasmine',
'karma-requirejs',
'karma-chrome-launcher',
'karma-safari-launcher'
]
});
};
Is this a bug or am I doing something wrong?
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Reactions: 12
- Comments: 28 (6 by maintainers)
Anyone coming across this thread years later, as I did. I discovered there is a boolean you can set in the config object, failOnEmptyTestSuite This let me setup a configuration without needing to define any test cases.
See: http://karma-runner.github.io/2.0/config/configuration-file.html
In case this helps anyone, I ran into this problem because my main test file has 2
describebut noit.It was like this:
And when I made it like this, it worked:
For those still coming across this from searches the default behavior appears to have possibly switched so that having no tests causes an error: https://github.com/karma-runner/karma/issues/1690
I got this error while using Chrome (or ChromeHeadless) as browser + using typescript. This solution fixed it for me: https://github.com/angular/angular-cli/issues/2125#issuecomment-247395088
@bolasblack No, since I’m not using Angular. Thanks anyway! 😃
In my case I was trying to run
While I’am not running
And that’s will not work and will show 0 specs, 0 failures ,of course.
I resolved the error when I remove
angular-scenariofromvendor.jsfile.Thanks stackoverflow: http://stackoverflow.com/questions/18366837/karma-not-running-tests
@marcobarbosa is it can help you?