Interop with RouterTestingHarness
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 25/100
- Issue 類型
- 功能
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- angular, typescript
研究方向
先閱讀 Angular 的 RouterTestingHarness 文件和 testing-library 的 render() 方法,然後比較 ComponentFixture 的職責。檢視 MockRouter 和 MockActivatedRoute 在路由器測試中的使用方式。完成的標準是:該 issue 已決定與 RouterTestingHarness 互通的設計,同時保留適當的 testing-library 支援。
由索引模型根據 Issue 內容生成。
描述
Angular introduced RouterTestingHarness as a utility for testing a component that depends on the router.
RouterTestingHarness manages a root component to instantiate <router-outlet> and returns routed component by navigateByUrl(url, component) method. AFAIK, there is a conflict with the testing-library's render() approach. The responsibility for instantiating a ComponentFixture must be one or the other.
So, I can't suggest a specific solution yet, but I think that testing involving Router can be complex and this is precisely the kind of area that the Testing Library should help with. It would be desirable to provide a means to escape from MockRouter and MockActivatedRoute while still being able to use them with the Testing Library.
- 主要語言
- TypeScript
- 星號
- 794
- 分支
- 95
- 平均合併
- 6 天 4 小時
- 30 天內合併 PR
- 3
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
testing-library/angular-testing-library 的其他 Issue
-
Add skills?未關閉
難度 5/5 一週以上 新手友好度 15/100
-
難度 5/5 一週以上 新手友好度 35/100
testing-library/angular-testing-library#593 · 1 則留言 · 1 個 reaction ·
-
難度 5/5 一週以上 新手友好度 35/100
testing-library/angular-testing-library#576 · 3 則留言 ·
-
難度 4/5 3-5 天 新手友好度 25/100
testing-library/angular-testing-library#290 · 4 則留言 ·
查看 testing-library/angular-testing-library 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
area:web p3
難度 2/5 1-3 小時 新手友好度 72/100
Lets-Parley/Parley#912 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
wealthfolio/wealthfolio#2376 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
be-BOP-io-SA/be-BOP#2817 ·
維護者通常 5 天內回覆
-
documentation good first issue
難度 1/5 1-3 小時 新手友好度 84/100
sno-ai/sno-station#149 · 1 則留言 ·
維護者通常 1 天內回覆