feat(doc): move input-output

This commit is contained in:
thomas
2023-10-17 23:12:11 +02:00
parent bbb00d60e6
commit be270efde1
26 changed files with 41 additions and 42 deletions

View File

@@ -3,7 +3,7 @@ title: 🟠 Input Output
description: Challenge 19 is about testing inputs and ouputs
author: Thomas Laforge
challengeNumber: 19
command: testing-input-output
command: test-input-output
sidebar:
order: 110
---
@@ -12,11 +12,11 @@ sidebar:
We have a small counter application that increments or decrements a number. The `CounterComponent` takes an initial value as an `@Input` and emits the result of the counter as an `@Output` when we click on the **Send** button. Since we are testing our component as a black box, we only have access to our inputs and listen to the output values. <b>We should not rely on any internal implementation details!!!</b>
You can play with it by running : `npx nx serve testing-input-output`.
You can play with it by running : `npx nx serve test-input-output`.
The file named `counter.component.spec.ts` will let test your application using Testing Library. To run the test suits, you need to run `npx nx test testing-input-output`. You can also install [Jest Runner](https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner) to execute your test by clicking on the `Run` button above each `describe` or `it` blocks.
The file named `counter.component.spec.ts` will let test your application using Testing Library. To run the test suits, you need to run `npx nx test test-input-output`. You can also install [Jest Runner](https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner) to execute your test by clicking on the `Run` button above each `describe` or `it` blocks.
For testing cypress, you will execute your test inside the `child.component.cy.ts` and run `npx nx component-test testing-input-output` to execute your test suits. You can add the `--watch` flag to execute your test in watch mode.
For testing cypress, you will execute your test inside the `child.component.cy.ts` and run `npx nx component-test test-input-output` to execute your test suits. You can add the `--watch` flag to execute your test in watch mode.
# Statement