I have a node application with separate sister folders and accompanying package.json files for the application code and tests.
Project
|
|-----Application
|-----app.js
|-----package.json
|-----Tests
|
|-------test.js
|-------package.json (nyc added here)
nyc is included as a dependency(along with mocha) in the test folder. It fails to show coverage for files in the application folder. I have tried to explicitly include application files by including "../Application/**/*.js" in the nyc config, bit that does not seem to do the trick.
Any ideas?
I found out that you can do this by using an obscure option called cwd as follows: