vuejs / vuejs/docs

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

Open
#1,922 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vue
Stars
3.2k
Forks
5k
Avg merge
14d 17h
Merged PRs (30d)
1

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue describes Vue 3.2.37, TypeScript, Cypress 10.6.0, and several attempted coverage tools, but names no documentation file or test. Start by reproducing the reported coverage setup from the listed environment and tools; done would be a clear, verified guide for covering Vue TypeScript SFC files with Cypress 10 headless.

Written by the indexing model from the issue text.

Assessment

Tech stack
cypress, typescript
Domain
documentation, testing
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.