karma-runner / karma-runner/karma
Do not show absolute paths, but relative paths (relative to project root)
- Dominant language
- JavaScript
- Stars
- 12k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
### Expected behavior
Do not show absolute paths, but relative paths (relative to project root)
E.g.
```
29 03 2016 10:48:36.002:INFO [watcher]: Changed file "build/js/app.test.js".
```
setting `basePath` do not affect this.
Add option to show relative paths, or add hook to plugins.
### Actual behavior
```
PhantomJS 2.1.1 (Windows 8 0.0.0) Dummy test should be ok FAILED
Expected Function to be 1.
d:/Dev/project/build/js/app.test.js:16:62 <- src/scripts/app.test.ts:7:34
d:/Dev/project/node_modules/angular2/bundles/testing.dev.js:2068:15
d:/Dev/project/node_modules/angular2/bundles/testing.dev.js:2068:15
d:/Dev/project/node_modules/angular2/bundles/testing.dev.js:2068:15
d:/Dev/project/karma.shim.js:34:24
invoke@d:/Dev/project/node_modules/angular2/bundles/angular2-polyfills.js:332:34
run@d:/Dev/project/node_modules/angular2/bundles/angular2-polyfills.js:227:50
d:/Dev/project/node_modules/angular2/bundles/angular2-polyfills.js:576:61
invokeTask@d:/Dev/project/node_modules/angular2/bundles/angular2-polyfills.js:365:43
runTask@d:/Dev/project/node_modules/angular2/bundles/angular2-polyfills.js:263:58
drainMicroTaskQueue@d:/Dev/project/node_modules/angular2/bundles/angular2-polyfills.js:482:43
invoke@d:/Dev/project/node_modules/angular2/bundles/angular2-polyfills.js:434:41
PhantomJS 2.1.1 (Windows 8 0.0.0): Executed 10 of 10 (1 FAILED) (0.295 secs / 0.013 secs)
```
```
29 03 2016 10:48:36.002:INFO [watcher]: Changed file "d:/Dev/project/build/js/app.test.js".
```
### Enviroment Details
Karma version: 0.13.19
Contributor guide
Research direction
Reproduce the output with Karma 0.13.19 using the Windows-style paths shown in the issue, then trace where failure stack paths and watcher messages are formatted. Done means both outputs use paths relative to the project root without changing the effect of basePath, with coverage for the requested behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100