Test runner: --test-reporter-destination should create the folder if not found
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 122k
- フォーク
- 37.3k
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 283
説明
What is the problem this feature will solve?
Hi 👋
Fairly easy one:
I have node --test --experimental-code-coverage --test-reporter-destination="coverage/lcov.info" outputting the coverage file to the coverage folder.
However, if the coverage folder does not exist beforehand, an ENOENT is thrown.
Since storing the behavior of storing coverage in coverage/lcov.info, and having that folder in .gitignore is rather standard, it'd be nice to have Node creating the folder in which it will place the coverage report in case it doesn't exist.
Thanks :)
What is the feature you are proposing to solve the problem?
When writing coverage report, check if the destination folder exists, and if not, create it beforehand
What alternatives have you considered?
- version controlling the coverage folder with a
.gitkeepfile, but it's cumbersome - Having the CLI
testscript in my package json create the folder itself, but that's quite inelegant to maintain for both Windows and Unix users - Switching to another test runner and losing all the charisma points that come with using the native one
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、coverage が存在しない場合に、提供された node --test --experimental-code-coverage --test-reporter-destination="coverage/lcov.info" コマンドで問題を再現します。テストランナーによる reporter の宛先処理を追跡し、coverage レポートが書き込まれる前に宛先フォルダーが作成されることを、ネストされたフォルダーが必要な場合も含めて確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, node.js
- 領域
- cli, testing-qa
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 68/100