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

Improve Angular Testing Library API documentation

Open
#653 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
479
Forks
740
PR merge metrics
No merged PRs in 30d

Description

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();

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Angular Testing Library API documentation at the linked RenderOptions page. Check the declarations example, add the missing providers description, and clarify which options go to Angular TestBed and how TestBed can support non-standard cases. Done means the examples and explanatory notes accurately cover these points.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.