docs icon indicating copy to clipboard operation
docs copied to clipboard

Coverage of Vue/TS SFC files (Cypress 10 headless)

Open lukemovement opened this issue 3 years ago • 0 comments

I've been trying to figure out how I can get full coverage of Vue files that contain TypeScript code. So far I have tried virtual every combination of setting with (and some of these instrumenters togeather);

  • babel-plugin-istanbul
  • @jsdevtools/coverage-istanbul-loader
  • istanbul-instrumenter-loader
  • c8
  • nyc (instrument / extends typescript / extending babel)
  • pre-instrumenting and serving with a minimal server dependency
  • vue-nyc

But nothing seems to work so far. Can anyone point me in the right direction please? I imagine the loader can be injected in to thee webpack config via the chain webpack call back available in the vue config file but I can not figure out where to put it.

Environment

  • Vue 3.2.37
  • @vue/cli-plugin-e2e-cypress 5.0.8
  • Cypress 10.6.0

This seems to be a really common issue without any solutions available. Especially for Vue 3 / TS.

lukemovement avatar Aug 17 '22 23:08 lukemovement