Allow for declaring the nycrcPath to use custom-named configuration files.
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- cypress, typescript
- Ambito
- testing
Direzione di ricerca
Inizia tracciando il modo in cui la configurazione di Cypress legge le impostazioni di NYC e il modo in cui il plugin individua attualmente i file .nycrc predefiniti. Controlla i test esistenti per la configurazione e la coverage, quindi verifica il supporto per un percorso personalizzato fornito tramite config.nycrcPath o config.env.nycrcPath. Il lavoro è completato quando Cypress utilizza la configurazione selezionata mantenendo il comportamento predefinito esistente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is your feature request related to a problem? Please describe.
Right now, this plugin supports loading default named ".nycrcfiles, but cannot utilize a custom named one, like.nycrc.config.cypress.js`. An option to provide custom configuration options exist for other test frameworks, like vitest.
Specifically in the case I am using, I need to have distinct outputs between unit and component test coverage, where Vitest handles unit tests, and Cypress handles component tests. This is due to limitations of how Cypress handles source maps versus Vitest where line lengths do not align properly (and this is well-documented in this repo and in the official nyc repo as well). To avoid that issue, I need separate .nycrc configs for both test frameworks.
Cypress currently only supports default named .nycrc files, or a configuration defined in the package.json, but this limits how we can use nyc as it prefers the configuration used for Cypress over any other configurations that can exist. This is a problem if we need to merge results and report on total coverage combined by both, running nyc report will ignore the files matched in the unit test configuration.
Describe the solution you'd like
The plugin should allow for calling a custom nycrcPath when being declared in the Cypress configuration, either by config.nycrcPath or config.env.nycrcPath.
For an example, see here:
https://github.com/iFaxity/vite-plugin-istanbul?tab=readme-ov-file#istanbulplugin--opts--
Describe alternatives you've considered
I will need to use three .nycrc configurations which is incredibly messy:
.nycrc.config.mjs, a default config used only for accurate reporting of merged component + unit test code coverage results. This would be called in a command likenpx nyc report --nycrc-path=./.nycrc.config.mjs. Specifying the path is necessary here..nycrc.config.component.mjs, a Cypress-specific configuration extended from the default; it must be loaded as part of thepackage.jsonusing"nyc": { "extends": "./.nycrc.config.component.mjs" }. Runningnpx nyc reportwithout declaring the path will utilize this config instead of the default, which is the main issue..nycrc.config.unit.mjsfor Vitest files only.
Additional context
Add any other context or screenshots about the feature request here.
- 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cypress-io/code-coverage
-
Difficoltà 3/5 Mezza giornata Idoneità per principianti 40/100
cypress-io/code-coverage#1018 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
cypress-io/code-coverage#993 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
cypress-io/code-coverage#959 ·
I maintainer di solito rispondono entro 1 giorno
-
performance
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
cypress-io/code-coverage#933 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
cypress-io/code-coverage#928 · 1 commento · 4 reazioni ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di cypress-io/code-coverage
Issue simili
-
[Text] Add Reading Time & Word Count Estimator for Reflection Notes in src/lib/text/reading-time.tsApertaarea:core beginner-friendly community contributions-welcome difficulty:easy enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
[fullsend] E2E: scorecard — filecheck GitLab entity metrics unavailable due to initialDelay timingApertae2e-failure ready-to-code
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
redhat-developer/rhdh-plugin-export-overlays#4698 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
devswha/herdr-web-ui#2884 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
b:minor bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
software-mansion/argent#1771 ·
I maintainer di solito rispondono entro 1 giorno