testing-library / testing-library/testing-library-docs
Improve Angular Testing Library API documentation
Open
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. 🙂
- 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
- 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.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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