`all:true` not working with Next application

Aperta
#552 10 commenti 4 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cypress, next.js, typescript

Direzione di ricerca

Il report indica l'impostazione nyc.all di package.json, .nyc_output/out.json e un'applicazione Next testata tramite Cypress. Inizia riproducendo il problema con all:true e confronta la coverage delle pagine caricate e non caricate; il lavoro è completato quando i file selezionati da NYC all compaiono nell'output della coverage.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Versions

  • What is this plugin's version? 3.9.12
  • What is Cypress version? 8.2.0
  • What is your operating system? Mac OS 12.1
  • What is the shell? ZSH
  • What is the Node version? 14.18.2
  • What is the NPM version? 8.3.2
  • How do you instrument your application? Cypress does not instrument web application code, so you need to do it yourself.
    Like mentioned in the installation guide here
  • When running tests, if you open the web application in regular browser, and open DevTools, do you see window.__coverage__ object? Can you paste a screenshot?

I don't think I do but I get coverage in the end.

  • Is there .nyc_output folder? Is there .nyc_output/out.json file. Is it empty? Can you paste at least part of it so we can see the keys and file paths?

This is generated, but no empty objects for empty files.

  • Do you have any custom NYC settings in package.json (nyc object) or in other NYC config files
  "nyc": {
    "all": true
  }
  • Do you run Cypress tests in a Docker container?
    No

Describe the bug
I use the option all:true but I don't see all files. For example I have some files in pages/.. which are not displayed at all. It seems that just loaded files are used.

The NYC options from the package.json are used because I fiddled around with the include parameter and it is filtering, so that seems to work. I don't see any difference in the output if I use true or false for the all option.

Lingua principale
TypeScript
Stelle
440
Fork
114
Merge medio
42m
PR unite (30g)
19

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cypress-io/code-coverage

Tutte le issue di cypress-io/code-coverage

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.