Generate the coverage files for istanbul:
- run
npm i
- run
npm i git+https://github.com/coreyfarrell/nyc.git#node8 -D
- change "locv" reporter to "html-spa"
- run
npm link packages/istanbul-reports
- Unless istanbuljs/istanbuljs#428 has been merged, go to packages/istanbul-reports/lib/none/index.js and change the implementation to
class NoneReport extends ReportBase {
constructor() {
super();
}
}
- Fix the merge reports to work - edit
monorepo-merge-reports.js
to have the following e.g. an explicit path to nyc
glob.sync('packages/*/.nyc_output').forEach(nycOutput => {
const { status, stderr, stdout, output } = spawnSync(
'node',
[
'node_modules/nyc/bin/nyc.js',
'merge',
- test with
npm test
Next, to test html-spa changes:
- inside
packages/istanbul-reports
runnpm run prepare
- At this point, re-run the report with
npm test
on the root, or if you just changed the css/js copy thehtml-spa
folder to the generated folder.