karma-runner / karma-runner/karma
Plugin injection order to context.html
- Dominant language
- JavaScript
- Stars
- 12k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I have a plugin https://github.com/taras42/karma-jasmine-html-reporter and issue related to it https://github.com/taras42/karma-jasmine-html-reporter/issues/4.
Appears to be, since version 0.12.32 the order of plugin injection to context.html has been changed.
My plugin has a dependancy on jasmine which is framework in karma terms, and it loads after reporters now, so it fails (reporter) in epic manner).
I found the chages in `karma/lib/server.js`
Next code code has been removed from line 30 and moved to line 324:
```
config.frameworks.forEach(function(framework) {
injector.get('framework:' + framework);
});
```
So reporters are loading now before frameworks. It will affect other plugins too (if they have deps on frameworks).
It's planned change or not?
Thanks in advance!
Contributor guide
Research direction
Start in karma/lib/server.js, comparing the framework injection code moved from around line 30 to line 324 and how that affects plugin loading into context.html. Reproduce the reporter/framework ordering failure described in the linked plugin issue, then add coverage showing the expected injection order before considering the issue resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100