mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-11 05:13:02 -05:00
33 lines
1.8 KiB
Markdown
33 lines
1.8 KiB
Markdown
<h1>Testing with Angular CDK Harness</h1>
|
|
|
|
> Author: Thomas Laforge
|
|
|
|
### Statement:
|
|
|
|
The objective of this challenge is to have a better understanding of the CDK test harness API. In this initial challenge, we will only use Angular Material's built-in harnesses.
|
|
|
|
The goal is to test the functionality of `child.component.ts`. I have prepared a test suite that you need to implement, but feel free to include additional tests as well.
|
|
|
|
**Note:** You are welcome to use Testing Library if you wish.
|
|
|
|
Documentation for CDK Component Harness is [here](https://material.angular.io/cdk/test-harnesses/overview#api-for-test-authors)
|
|
Documentation for Angular Material component is [here](https://material.angular.io/components/button/overview)
|
|
|
|
### Submitting your work
|
|
|
|
1. Fork the project
|
|
2. clone it
|
|
3. npm install
|
|
4. `npx nx serve testing-harness` to play with the application
|
|
5. `npx nx test testing-harness` to test your application with Testing Library
|
|
6. _...work on it_
|
|
7. Commit your work
|
|
8. Submit a PR with a title beginning with **Answer:23** that I will review and other dev can review.
|
|
|
|
<a href="https://github.com/tomalaforge/angular-challenges/pulls?q=label%3A23+label%3Aanswer"><img src="https://img.shields.io/badge/-Solutions-green" alt="harness testing"/></a>
|
|
<a href='https://github.com/tomalaforge/angular-challenges/pulls?q=label%3A23+label%3A"answer+author"'><img src="https://img.shields.io/badge/-Author solution-important" alt="harness testing solution author"/></a>
|
|
|
|
<!-- <a href="{Blog post url}" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/-Blog post explanation-blue" alt="nested testing blog article"/></a> -->
|
|
|
|
_You can ask any question on_ <a href="https://twitter.com/laforge_toma" target="_blank" rel="noopener noreferrer"><img src="./../../logo/twitter.svg" height=20px alt="twitter"/></a>
|