You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use of nyc --all mocha should collect coverage data for src directory only, once for each file (tested or not doesn't matter).
Observed Behavior
Instead, with junction links as part of project path, coverage data collected for:
each tested file (as should be);
each file in src folder (results in duplicates of already listed tested files with 0% coverage);
each file in test folder (which is plain wrong, as test folder not in coverage interest paths by default).
Everything referred to as junctions was made like this cmd: mklink /j junction D:\junction D:\junction is junction origin (real folder), C:\junction is junction link.
Note, that including/excluding coverage paths for nyc do nothing at all, --all flag becomes useless as consequence.
Temporary solutions
Move project or it parts within junction links to non-junction structure;
Access project folder through junction origins (cannot be achieved for part of project).
Bonus Points! Code (or Repository) that Reproduces Issue
Sample structure and contents in gist suffice to serve the case (nevertheless, reproduced same stuff on several of other projects).
Assuming project structure of:
folder or junction
+-- src
| +-- a.js
| `-- b.js
`-- test
`-- a.js
If nyc --all mocha used in plain folder, everything works as expected:
The text was updated successfully, but these errors were encountered:
ghost
changed the title
Windows: Undefined path resolution behaviour for projects (and it parts) located within directory junctions
Windows: Undefined path resolution behaviour for projects (and it parts) located within directory junction links
Apr 17, 2017
ghost
changed the title
Windows: Undefined path resolution behaviour for projects (and it parts) located within directory junction links
Windows: Undefined path resolution behaviour for project (and it parts) located within directory junction links
Apr 17, 2017
would you mind reopening an issue there? would also greatly appreciate any help you can provide digging into things -- we should be able to add a few new failing test cases to test-exclude.
Expected Behavior
Use of
nyc --all mocha
should collect coverage data for src directory only, once for each file (tested or not doesn't matter).Observed Behavior
Instead, with junction links as part of project path, coverage data collected for:
Everything referred to as junctions was made like this cmd:
mklink /j junction D:\junction
D:\junction is junction origin (real folder), C:\junction is junction link.
Note, that including/excluding coverage paths for nyc do nothing at all, --all flag becomes useless as consequence.
Temporary solutions
Bonus Points! Code (or Repository) that Reproduces Issue
Sample structure and contents in gist suffice to serve the case (nevertheless, reproduced same stuff on several of other projects).
Assuming project structure of:
If
nyc --all mocha
used in plain folder, everything works as expected:If
nyc --all mocha
used on directory path within junction link:If
nyc --all mocha
used in junction origin (source of junction on D volume):The most interesting case -- if
nyc --all mocha
used in project with src as junction link:Note that cases of project path and src junction links differs greatly.
Forensic Information
Operating System: Windows 10 ver.1607
Environment Information:
Output located at same gist
The text was updated successfully, but these errors were encountered: