testing-library / testing-library/testing-library-docs

Improve Angular Testing Library API documentation

未关闭
#653 5 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
JavaScript
星标
479
派生
740
PR 合并指标
30 天内没有已合并 PR

描述

I am new to Angular Testing and stumbled across some misunderstandings while writing my first tests. I would like to help you improve it, so let's start collecting the issues. 🙂

  1. The example for the declarations (within RenderOptions) is wrong. It configures the providers. Furthermore there is no descriptions for the providers option. https://testing-library.com/docs/angular-testing-library/api#declarations
  2. We might also add a note which of the RenderOptions are passed to the Angular TestBed. Or even separate those from the added render properties.
  3. Explaining that this library still works with the core testing functionality of Angular under the hood will also help to implement non-standard situations. For example in one test I needed to interact with a service. This can be done with the Angular TestBed: TestBed.get(TargetService).init();

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从链接的 RenderOptions 页面上的 Angular Testing Library API 文档开始。检查 declarations 示例,添加缺失的 providers 描述,并明确哪些选项会传递给 Angular TestBed,以及 TestBed 如何支持非标准情况。当示例和说明性注释准确涵盖这些要点时,即可视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular
领域
documentation
Issue 类型
文档
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。