The web app is written in python + typescript and uses Selenium for the font-end tests. I've tried to follow this answer to setup the test coverage analysis. The simplified pipeline is:
- After TS --> JS conversion the code is instrumented with nyc
nyc instrument ./dist/js_cov/ ./dist/js/ --embed-source true - Selenium runs some tests and stores the output in the .nyc_output folder. The files are generated correctly with coverage info inside e.g.
{"path/vars.bundle.js":{"path":"path/vars.bundle.js""statementMap":{"0":{"start":{"line":1,"column":9},"end":{"line":550,"column":1}},...
I've also checked that in the browser console window.__coverage__ looks well with the list of files and coverage results.
- I expect
nyc report --cwd .to show the coverage result, but the report is always empty. Neither files nor coverage results are shown.
----------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------|---------|----------|---------|---------|-------------------
All files | 0 | 0 | 0 | 0 |
----------|---------|----------|---------|---------|-------------------
nyc merge works fine and create a general coverage file for all the tests, bu the report is still empty
What could be the problem that causes an empty report?