question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting "Executed 0 of 0 ERROR" in the console

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Reactions:12
  • Comments:28 (6 by maintainers)

github_iconTop GitHub Comments

22reactions
Drumstix42commented, May 3, 2018

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

6reactions
andrerpenacommented, Jun 30, 2015

In case this helps anyone, I ran into this problem because my main test file has 2 describe but no it.

It was like this:

describe('Something abstract', function() {
    describe('Something specific', function() {
    });
});

And when I made it like this, it worked:

describe('Something abstract', function() {
    describe('Something specific', function() {
        it('Something', function() {
            assert.equal(1, 1);
        });
    });
});
Read more comments on GitHub >

github_iconTop Results From Across the Web

Karma Jasmine: Executed 0 of 0 Error - Stack Overflow
After doing the karma init and writing the first test for a home controller, I keep getting Executed 0 of 0 ERROR ....
Read more >
[0.10.4] - Karma renaming files + Executed 0 of 0 ERROR
It looks like there is just a javascript error in one of the scripts you are loading. Hit debug button and chrome and...
Read more >
an error was thrown in afterall error: expected false to be true.
My tests were failing because state in my reducer was undefined. I was also getting a warning in the console that The feature...
Read more >
AngularJS – Karma (e2e) : Executed 0 of 0 ERROR – iTecNote
When I try to start my e2e test I get this on my console; ... Chrome 28.0.1500 (Mac OS X 10.8.4): Executed 0...
Read more >
karma-runner/karma - Gitter
... (Linux 0.0.0): Executed 0 of 0 ERROR (1.144 secs / 0 secs). HeadlessChrome 0.0.0 (Linux 0.0.0): Executed 0 of 0 [31m ERROR...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found