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
- 星标
- 792
- 派生
- 95
- 平均合并
- 34 分钟
- 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 小时 新手友好度 82/100
openwatersio/slackwater-database#281 ·
维护者通常 1 天内回复
-
accepted bug via-triage
难度 2/5 1-3 小时 新手友好度 76/100
pingdotgg/t3code#18690 · 1 条评论 ·
维护者通常 1 天内回复
-
Bayern feature:Application ready web
难度 2/5 1-3 小时 新手友好度 67/100
digitalfabrik/entitlementcard#3176 ·
维护者通常 7 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
NanmiCoder/cc-haha#1533 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复