Allow for declaring the nycrcPath to use custom-named configuration files.
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- cypress, typescript
- Área
- testing
Línea de trabajo
Comienza rastreando cómo la configuración de Cypress lee los ajustes de NYC y cómo el plugin descubre actualmente los archivos .nycrc predeterminados. Revisa las pruebas existentes de configuración y cobertura; después, verifica la compatibilidad con una ruta personalizada proporcionada mediante config.nycrcPath o config.env.nycrcPath. Se considera terminado cuando Cypress utiliza la configuración seleccionada y conserva el comportamiento predeterminado existente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 440
- Forks
- 114
- Merge medio
- 42 min
- PR fusionados (30 d)
- 19
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de cypress-io/code-coverage
-
Dificultad 3/5 Medio día Aptitud para principiantes 40/100
cypress-io/code-coverage#1018 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
cypress-io/code-coverage#993 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
cypress-io/code-coverage#959 ·
Los mantenedores suelen responder en 1 día
-
performance
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
cypress-io/code-coverage#933 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
cypress-io/code-coverage#928 · 1 comentario · 4 reacciones ·
Los mantenedores suelen responder en 1 día
Todos los issues de cypress-io/code-coverage
Issues similares
-
[Text] Add Reading Time & Word Count Estimator for Reflection Notes in src/lib/text/reading-time.tsAbiertoarea:core beginner-friendly community contributions-welcome difficulty:easy enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
[fullsend] E2E: scorecard — filecheck GitLab entity metrics unavailable due to initialDelay timingAbiertoe2e-failure ready-to-code
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
redhat-developer/rhdh-plugin-export-overlays#4698 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
devswha/herdr-web-ui#2884 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
b:minor bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
software-mansion/argent#1771 ·
Los mantenedores suelen responder en 1 día