Allow for declaring the nycrcPath to use custom-named configuration files.
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- cypress, typescript
- 領域
- testing
調査の方向性
まず、Cypress の設定が NYC の設定をどのように読み取るか、また plugin が現在どのようにデフォルトの .nycrc ファイルを検出しているかを追跡します。既存の設定テストと coverage テストを確認し、config.nycrcPath または config.env.nycrcPath で指定されたカスタムパスのサポートを検証します。Cypress が選択された設定を使用し、既存のデフォルト動作を維持できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 440
- フォーク
- 114
- 平均マージ
- 42分
- マージ済み PR(30日)
- 19
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cypress-io/code-coverage のほかの issue
-
難易度 3/5 半日 初心者へのやさしさ 40/100
cypress-io/code-coverage#1018 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
cypress-io/code-coverage#993 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
cypress-io/code-coverage#959 ·
メンテナーはふだん 1 日以内に返信
-
performance
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
cypress-io/code-coverage#933 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
cypress-io/code-coverage#928 · コメント 1 件 · リアクション 4 件 ·
メンテナーはふだん 1 日以内に返信
cypress-io/code-coverage の issue をすべて見る
似ている issue
-
[fullsend] E2E: scorecard — filecheck GitLab entity metrics unavailable due to initialDelay timingオープンe2e-failure ready-to-code
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
redhat-developer/rhdh-plugin-export-overlays#4698 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
devswha/herdr-web-ui#2884 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
b:minor bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
software-mansion/argent#1771 ·
メンテナーはふだん 1 日以内に返信
-
Resources: New palettes of Xiamen対応中かも @rmt-svc が今日担当しました。 オープンresources
難易度 1/5 1〜3時間 初心者へのやさしさ 74/100
railmapgen/rmg-palette#2491 ·
メンテナーはふだん 4 日以内に返信