-
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
karma v1.0.0: You need to include some adapter that implements __karma__.start method! #2194
karma v1.0.0: You need to include some adapter that implements __karma__.start method! #2194
Comments
Thanks for the report, I think the problem is somewhere with karma-jspm. When I comment it out the error goes away. Might be some internals that changed that karma-jspm relied on. |
@dignifiedquire thank you for the quick response. I will relate this issue to karma-jspm. |
Unfortunately, it also breaks |
The problem indeed seems to be with karma-jspm. I tracked it down to some duplicate file references in the globs on the That said, the result of this duplicate file reference is that no files are loaded at all, including |
Not surprisingly, it breaks |
@jgerigmeyer : that's odd. I use Versions I use:
|
@jgerigmeyer do you use jspm in your project? if yes, can you share your setup? |
I am not using jspm. With this setup: "karma": "1.1.0",
"karma-chai-sinon": "0.1.5" I get the following: PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
You need to include some adapter that implements __karma__.start method!
PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 0 of 0 ERROR (0.024 secs / 0 secs) If I remove |
I'm running a similar configuration to @jgerigmeyer and experiencing the same outcome While doing further digging, and attempting to reconfigure fallbacks, I've found that including 'chai' with karma-chai in the frameworks array also triggers the same error, while 'sinon' with karma-sinon does not. In my package.json I'm using '*' for versions to ensure most current editions. If I roll-back to karma v0.13.22 this issue does not occur. for reference, frameworks array differences in karma.conf.js: Causes error indicated in this bug: This as well: Runs tests (but tests fail due to lack of chai: |
This is my config that doesn't work. Downgraded to 0.13.22
|
@thepian try disabling the different plugins to see which one is throwing the issue, and file an issue on the respective repo please. |
Hello ! I have the same problem here, after hours of investigation :) karma.conf.js
package.json
When I set karma version at 1.0.0, it is not working anymore, with this error:
|
Since both the karma plugins for Chai (karma-chai and karma-chai-sinon) didn't show hope of responses anytime soon (both are year+ in terms of any new dev or issue feedback), and I'm using RequireJS for our project, the webpack solutions for the sinon include didn't apply. What I've done so far to resolve this issue is to add chai expect via a testUtils file (which I was already including) EDIT: removed changes to test-main.js as chai was already included via other plugins karma.conf.js
testUtils.js
This appears to resolve the dependency issue and the karma start error, however, I feel dirty putting it on the window object. It's a more simple fix than updating every single test to include expect, which is used globally, so it seems to make sense. |
Due to deadlines, I couldn't press further than this, but combined with my above changes, I found that the core issue is that both karma-chai-sinon and karma-jquery-chai load chai directly, and that triggers the error in my scenario for this issue thread. The other half of my solution (to restore access to chai-sinon) was to create a custom instance of karma-chai-sinon karma-chai-sinon-custom.js
and include it in karma.conf.js as follows:
Specific to the original plugin (karma-chai-sinon) there was a lot of phantomjs fixing and preloading of libraries, which in the 1.0.0+ versions of karma appear to cause collisions that result in the test-runner failing out. This will probably be an issue for all Karma + Chai related plugins that auto-load chai as part of their routine. Same for any combination of plugins loading Sinon, as I experienced the same collision with karma-sinon and karma-chai-sinon on the Sinon-specific include (albeit that this is a negative test, as there aren't typically multiple sinon-plugins from what I've seen.) |
Thanks to @m-a-r-c-e-l-i-n-o for pointing me in the right direction Fixes #2194
Released as |
It works for me ! Thanks a lot 👍 |
it works for me too 👍 |
👍 |
I'm still having issues with this. Everything should be updated.
|
Hey @aaron-zipnosis in your karma.conf.js, what does your frameworks entry look like? I'm curious if you're loading both karma-chai and karma-sinon-chai as they both load chai (I just use karma-sinon-chai since it has both.) Also, if you gradually add items one at a time to the frameworks entry and re-run, is there a particular one that triggers this behavior? |
I had no luck with adding frameworks gradually. I also added
|
Hmm, have you tried cleaning out the npm_modules dir completely? I ask as I had a QA server stubbornly refuse to update even with the new version number until I wiped the directory completely. The only other thing I can think of is possibly dropping the preprocessors and re-adding to see if anything bypasses that error, as there might be a use-case outside what this thread originally handled. Ultimately, if you're getting the karma.start error even with the frameworks array empty, then it's most likely karma not being current, or something outside my scope of knowledge (for instance, preprocessor handling is not something I delved into when working on my temporary local solution before 1.2.0 came out.) |
I've consistently been |
var webpackConfig = require('../webpack.test');
module.exports = function(config) {
config.set({
// ... normal karma configuration
files: [
// all files ending in "_test"
'test_index.js'
// each file acts as entry point for the webpack configuration
],
preprocessors: {
// add webpack as preprocessor
'test_index.js': ['webpack']
},
browsers: ['Chrome'],
webpack: webpackConfig,
webpackMiddleware: {
// webpack-dev-middleware configuration
// i. e.
stats: 'errors-only'
},
autoWatch: false,
singleRun: false,
port: 9876,
colors: true,
logLevel: config.LOG_INFO
});
}; it work for me.when I remove |
This is a really bad error for missing a config file. |
Thanks to @megamindbrian for the TL;DR :) this is the error message you get after a fresh install if you have no Karma config file. Once you create a config file, the error goes away (even if you have no tests found). Happy testing! |
After upgrading our project from karma v0.13.22 to v.1.0.0 we get following error:
You need to include some adapter that implements __karma__.start method!
Here is a the repo: https://github.com/SerkanSipahi/app-decorators
Reproducing error:
Anyone have an idea What causes this error ?
The text was updated successfully, but these errors were encountered: