Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Unable to pass options to @neutrinojs/karma after #852 #907

Closed
edmorley opened this issue May 24, 2018 · 3 comments
Closed

Unable to pass options to @neutrinojs/karma after #852 #907

edmorley opened this issue May 24, 2018 · 3 comments
Assignees
Labels
Milestone

Comments

@edmorley
Copy link
Member

The @neutrinojs/karma preset used to allow passing options to it (and also adjust merging behaviour using the override option), but now exports only neutrino => { ... }.

This caused the treeherder karma config to silently break, such that it no longer runs any tests.

We should either:

  • re-add the ability to pass options to the preset (like most of the other presets)
  • make sure that trying to pass options doesn't silently fail, and also add this to the list of things we mention in the migration guide.
@edmorley
Copy link
Member Author

edmorley commented Jun 8, 2018

Treeherder is probably going to start rolling its own karma config for Neutrino 9, since our config differs quite a bit from that in @neutrinojs/karma. (eg we use Firefox not Chrome, jasmine not mocha, don't use coverage, and for legacy reasons use the karma-webpack "bundle all files together" approach.)

As such, we probably won't be using the ability to pass options (and set override: true) - so I'm now less fussed about whether we should restore this feature or not.

However if we decide not to, we should probably make the change in behaviour clearer, by emitting a warning/error if options are passed. (The same also applies to @neutrinojs/mocha and @neutrinojs/jest.)

@edmorley
Copy link
Member Author

@eliperelman - thoughts on this?

@eliperelman
Copy link
Member

eliperelman commented Aug 23, 2018

I discussed this with @edmorley over IRC, and we came to the realization that the only reason we needed the overwrite functionality was because the middleware was also responsible for spawning the karma process. Now that these aren't coupled, doing an overwrite doesn't needed to be supported since you could simply not use the middleware but still launch karma from your own karma.config.js.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants