---
title: 🟢 Harness
description: Challenge 23 is about testing with component harnesses
sidebar:
  order: 9
---

:::note
WIP: The following documentation will be reviewed and improved. However, you can still take on the challenge. If you don't understand a certain part, please feel free to reach out or create an issue.
:::

<div class="chip">Challenge #23</div>

## 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)

---

:::note
Start the project by running: `npx nx serve testing-harness`.
:::

:::tip[Reminder]
Your PR title must start with <b>Answer:23</b>.
:::

<div class="article-footer">
  <a
    href="https://github.com/tomalaforge/angular-challenges/pulls?q=label%3A23+label%3Aanswer"
    alt="Harness community solutions">
    ❖ Community Answers
  </a>
  <a
    href='https://github.com/tomalaforge/angular-challenges/pulls?q=label%3A23+label%3A"answer+author"'
    alt="Harness solution author">
    ▶︎ Author Answer
  </a>
  </div>
