https://github.com/alisaduncan/component-harness-code
Sample app with unit tests with and without test harnesses, and a custom component test harness for the component test harness presentation
https://github.com/alisaduncan/component-harness-code
angular
Last synced: about 1 month ago
JSON representation
Sample app with unit tests with and without test harnesses, and a custom component test harness for the component test harness presentation
- Host: GitHub
- URL: https://github.com/alisaduncan/component-harness-code
- Owner: alisaduncan
- Created: 2021-06-09T13:19:49.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-07-06T13:02:26.000Z (almost 5 years ago)
- Last Synced: 2025-03-04T07:42:22.183Z (over 1 year ago)
- Topics: angular
- Language: TypeScript
- Homepage:
- Size: 858 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# Using component harnesses to write tests and creating a test harness for a custom component
This is a tidy task todo list app with unit test examples. There are tests without using component harnesses and corresponding tests using component harnesses.
There's a custom UI component that has a test harness implementation along with tests for the test harness.
The code in this repo is used by [Tidying up your unit tests](https://alisaduncan.github.io/component-harness/) presentation.
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.0.3.
## Environment setup instructions
```sh
git clone
npm ci
```
## Serve the app
Run `npm start` or `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).