nodejs / nodejs/core-validate-commit
Refactor some cmd.js logic out into its own file for easier tests
還沒有人認領這個 Issue。
- 主要語言
- JavaScript
- 星號
- 55
- 分支
- 62
- 平均合併
- 4 天 9 小時
- 30 天內合併 PR
- 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 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先閱讀 cmd.js,找出判斷是否指定了特定 flag 的邏輯。將這段邏輯分離到獨立的檔案中,以便獨立測試,並在需要時使用模擬函式。完成的標準是:flag 偵測具有專注的測試,而且這些測試不會同時測試每個 flag 的作用。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript
- 領域
- cli
- Issue 類型
- 重構
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100