-
Notifications
You must be signed in to change notification settings - Fork 21
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
Breaks when browserify --standalone
bundle included via karma files
#12
Comments
Seems this has been fixed in a newer RequireJS Could you possibly update RequireJS in this package? |
It would be really useful if you could include the build config or even an package.json build script. |
Yes I think I tend to agree with you @beckyconning. I am also using a bundled JS file and getting the exact same error. Would be great to get an updated RequireJS in a new build. Have you managed to now get it working ? |
No I haven't, I ran out of time before I could work it out. I added an npm build script to my local fork which I should probably commit though. After the project I'm currently working on I'm going to put together the start of another Cucumber.js Karma adapter using the promises version of Cucumber.js and Browserify. This isn't because this one is bad. This one is awesome but I think @s9tpepper is too busy to maintain it. We depend on this a lot so we're happy to maintain a Cucumber.js Karma adapter and manage PRs etc. Let me know if you work it out though. |
I don't think its as simple as updating RequireJS and rebuilding though. I think files are being manually loaded in some fashion that breaks RequireJS when combined with Browserify. |
Yeah I was thinking the exact same thing, in that at some point I would write my own Karma adapter utilising the existing CucumberJS and Browserify node packages (as I think the raw CucumberJS package works quite well as it is). Was toying with calling it karma-chameleon :) Why...? because it hasn't been done yet, because it's funny, and because I am child of the 80s and just love that song :) Pretty busy though, have deliverables and need an immediate solution, so in the interim we are going to look at using Yadda (https://github.com/acuminous/yadda) which seems to be very similar to what CucumberJS offers, Gherkin-like feature specs, supports a plethora of other test framework integration (Jasmine, Mocha, etc), utilises RequiresJS, has documented Karma examples and seems to be pretty progressive, active & well-maintained. Am doing a Spike on it today, and so hopefully is fit for purpose. |
Meant utilises browserify... |
I am running afoul of the same issue but would definitely prefer to continue to use something that works with karma since we have approaching 500 unit tests in our existing karma setup. |
As a karma-cucumber-js user
I want to include a bundle built with Browserify
So that I can use its functionality inside my feature testing DSL
Given a bundle that has been built with Browserify as follows
browserify src/some-module.js --standalone some-module > bundle.js
When I include this module in
karma.conf.js
's file section as follows{ pattern: "./node_modules/some-module/bundle.js", watched: false, included: true, served: false }
I should not be presented with the error
Error: Mismatched anonymous define() module
The error originates from here https://github.com/s9tpepper/karma-cucumberjs/blob/master/lib/adapter.js#L1220
The text was updated successfully, but these errors were encountered: