karma-runner / karma-runner/karma-coverage
Files order hardly depended?
- Dominant language
- JavaScript
- Stars
- 771
- Forks
- 242
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I'm facing below problem in my project,
Here is the sample repo,
https://github.com/imvetri/JS-coverage
my.conf.js
```
files: [
'base/*.js',
'src/*.js',
'test/spec/*.js'
]
```
npm test
coverage-jasmine-istanbul-karma@0.0.1 test /Users/valappip/Downloads/coverage-jasmine-istanbul-karma-master
node_modules/.bin/karma start my.conf.js
INFO [karma]: Karma v0.10.10 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9.8 (Mac OS X)]: Connected on socket 70e_eJb6AVI-1iy4f_F9
PhantomJS 1.9.8 (Mac OS X) ERROR
ReferenceError: Can't find variable: base
at /Users/valappip/Downloads/coverage-jasmine-istanbul-karma-master/base/base-base.js:6
PhantomJS 1.9.8 (Mac OS X): Executed 0 of 0 ERROR (0.03 secs / 0 secs)
npm ERR! weird error 1
npm ERR! not ok code 0
If I change the files to,
files: [
'base/base.js',
'base/base-base.js',
'src/_.js'
'test/spec/_.js',
],
Then it gives the report , But in my actual project there are lots of JS files I cannot add one by one, Is there any way I can include all file in single shot? or Can i load dependency before test start?
Contributor guide
Research direction
Reproduce the failure with the linked JS-Coverage sample repository by running npm test and inspecting my.conf.js. Compare the glob-based files list with the explicitly ordered list and determine whether the issue concerns dependency order or loading all matching files. Done means documenting or confirming the supported way to preserve the required order.
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
- Needs clarification
- Newbie friendliness
- 25/100