Skip to content

Try to resolve source file paths before generating the report #188

Closed
@bahmutov

Description

@bahmutov

If we instrument the files ourselves, then shorten the path in the instrumented file so we can move it to say main.js, then the produced report will have main.ja (without full path) and full paths for other files. This creates weird reports

Example in examples/fullstack. The .nyc_output/out.json has 3 files

Screen Shot 2020-04-09 at 5 30 44 PM

All files are in the same folder (or at least can be found), but the report does not put files in the same level

$ ls -l *.js server/*.js
-rw-r--r--  1 gleb  staff    59 Apr  9 17:28 main.js
-rw-r--r--  1 gleb  staff  3261 Apr  9 17:28 server/main-instrumented.js
-rw-r--r--  1 gleb  staff   601 Apr  9 17:28 server/server.js
-rw-r--r--  1 gleb  staff   132 Apr  9 17:28 string-utils.js

Screen Shot 2020-04-09 at 5 31 36 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions