Closed mitchhentges closed 8 years ago
A couple things to note:
karma
and just check the node_modules
folder for certain packages. browser-launcher
will probably be used in a customer environment, and those don't have node_modules
folders. Instead, the consumer of browser-launcher
should directly require
and provide the karma launchers to browser-launcher
.$inject
information. Ideally, most of injected things should be mockable, but this might turn out to be a bust.After looking into this further, it's simply too much.
Karma is very closely tied to Angular (there's some $inject
shenanigans) and the plugins themselves are very close to Karma.
A ton of things would need to be mocked out, or copied from Karma - what about current bugs? Do we keep copying Karma's code into browser-laucher
? We can't just have Karma as a dependency, that's really weird.
The baseBrowserLauncher
is actually a rabbit hole of prototypes
and processLauncher
s and KarmaEventEmitter
s. Oh my.
Anways, if someone wants to submit a PR, feel free, but it'll be a fair amount of work.
See how Karma loads plugins and how each launcher has this
launcher:xyz
syntax.This will be super-helpful, especially if
james-browser-launcher
dies, and a new browser comes out. Rather than attempting to get a PR intojames-browser-launcher
(though that's awesome, too), a plugin can be used.