nodejs / nodejs/core-validate-commit
Refactor some cmd.js logic out into its own file for easier tests
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 55
- フォーク
- 62
- 平均マージ
- 4日 9時間
- マージ済み PR(30日)
- 1
説明
While working on issue #69 I started to come across places where it was a little difficult to test if just a particular flag was called. I think it might help if some of the logic that is in cmd.js is broken out into its own file, so it would be easier to test if a particular flag was specified, and not necessarily test what that flag actually does. That could be done in its own separate test, where it would be easier to mock certain functions.
@richardlau @Trott thoughts?
I can send a PR so we can talk about it also
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず cmd.js を読み、特定の flag が指定されたかどうかを判定するロジックを特定します。そのロジックを独立したファイルに分離し、必要に応じて関数をモックしながら単独でテストできるようにします。各 flag の動作まで同時にテストしない、flag 検出に焦点を当てたテストが用意されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- cli
- issue の種類
- リファクタリング
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100