-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting "Executed 0 of 0 ERROR" in the console #753
Comments
I've also got the same error. result
karma.conf.coffee module.exports = (config) ->
config.set
plugins: [
'karma-chai'
'karma-mocha'
'karma-chrome-launcher'
'karma-coffee-preprocessor'
]
# base path, that will be used to resolve files and exclude
basePath: '../'
frameworks: ['mocha', 'chai']
# list of files / patterns to load in the browser
files: [
'public/js/vendor.js'
'bower_components/angular-mocks/angular-mocks.js'
'app/resources/**/*.coffee'
'test/unit/**/*.spec.*'
]
# list of files to exclude
exclude: []
preprocessors: {
'app/resources/**/*.coffee': ['coffee']
'test/unit/**/*.coffee': ['coffee']
}
# use dots reporter, as travis terminal does not support escaping sequences
# possible values: 'dots', 'progress'
# CLI --reporters progress
reporters: ['progress']
# web server port
# CLI --port 9876
port: 9876
# enable / disable colors in the output (reporters and logs)
# CLI --colors --no-colors
colors: true
# level of logging
# possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
# CLI --log-level debug
logLevel: config.LOG_INFO
# enable / disable watching file and executing tests whenever any file changes
# CLI --auto-watch --no-auto-watch
autoWatch: true
# Start these browsers, currently available:
# - Chrome
# - ChromeCanary
# - Firefox
# - Opera
# - Safari (only Mac)
# - PhantomJS
# - IE (only Windows)
# CLI --browsers Chrome,Firefox,Safari
browsers: ['Chrome']
# If browser does not capture in given timeout [ms], kill it
# CLI --capture-timeout 5000
captureTimeout: 20000
# Auto run tests on start (when browsers are captured) and exit
# CLI --single-run --no-single-run
singleRun: false
# report which specs are slower than 500ms
# CLI --report-slower-than 500
reportSlowerThan: 500 resources.spec.coffee 'use strict'
console.log 'spec run' # it's ok
describe "services", ->
it "should error", ->
console.log 'it should error' # not print
'a'.should.equal 1 |
I resolved the error when I remove Thanks stackoverflow: http://stackoverflow.com/questions/18366837/karma-not-running-tests @marcobarbosa is it can help you? |
@bolasblack No, since I'm not using Angular. Thanks anyway! :) |
@marcobarbosa Do you have a github project I could look at? Or just a simple example that reproduces what you are seeing. |
Sorry it's actually private so I can't share :( I have updated the karma.conf above but just some paths - shouldn't interfere. |
@marcobarbosa This looks like a problem loading the tests. Can you share the relevant parts of your |
@marcobarbosa it's hard to help with this without seeing your files. It's more likely you are not including the test files or they are not executed. What is your |
Hi guys, Sorry about this. I don't have access to the files (private) so I can't really paste them. I know this is how my test-main.js was looking like then:
|
Maybe this issue should be closed? |
@marcobarbosa Did you figure this out? Check |
I too am seeing this error. Not sure if it's because I'm using brunch and the tests are all wrapped in https://github.com/mikew/brunch-flask Given that I am using brunch, this isn't a huge deal, though I do like the auto-launching of the browsers and the console output. |
Ah, trying out test'em lead me to the solution.
|
Yeah, you need the Anyway, now Karma complains that you are missing an adapter, which would at least make it easier to debug. Closing. |
FWIW, I ran into this anonymous Since I'd been hacking around in modules' source code, I don't think this would happen during normal karma operation. |
In case this helps anyone, I ran into this problem because my main test file has 2 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: #1690 |
Hi guys! My config file name is (test.conf.js) ============================Code Start======================================
}) files: [ In this part, I always ignore. But here was the problem My project directory Project22 I think it should work fine for you. |
I got this error while using Chrome (or ChromeHeadless) as browser + using typescript. This solution fixed it for me: angular/angular-cli#2125 (comment) |
|
thanks Johnjbarton |
Anyone coming across this thread years later, as I did. I discovered there is a boolean you can set in the config object, failOnEmptyTestSuite See: http://karma-runner.github.io/2.0/config/configuration-file.html |
Got this error when testing with typescript. The reason is because karma does not host typescript files by default. The solution was to add this to my karma config:
|
Thanks @aj-r adding mime property to karma.conf.js helped me. Now my tests are executing |
In my case it was below line that I was missing bootstrap angular.
|
In my case, I was actually getting "Executed 0 of N ERROR". Simple tests would show in N but would never actually be executed. I removed each of my scripts and eventually narrowed it down to a |
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. |
can anyone else confirmed this worked for them before I do it myself? |
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:
I have found similar issues but related to "Angular" not "Flight".
This is my karma.conf:
Is this a bug or am I doing something wrong?
The text was updated successfully, but these errors were encountered: