I write an Electron app (in TypeScript) that I test through AVA (in whose tests I use Spectron to communicate with the app). The (browser) content of my app is generated by using Angular. I execute the tests via:
npm run ava
All of this works great! Now I would like to put code-coverage on top of it. As listed above I use a variety of different frameworks and almost each one brings in their own solution.
- AVA recommends nyc.
- Electron has some user-tutorials which use jest + their coverage?
- Angular brings in their own coverage which AFAIK can only be invoked by
ng test
so this is out too (I guess) because I have an electron app
I tried nyc
but in its default configuration it only records the "main-process", but more importantly would be the (browser) content of the app. AFAIK nyc
could instrument all *.ts
files to add coverage info but to combine that with the Angular build tools doesn't seem to be easy/possible.
What would be a good way to solve this task? Any experiences on this?