Author: Thomas Laforge
We have a small application that send a title to a fake backend that you type inside a input.
If the title is correctly typed, you can send the request otherwise you get a nice error and the request is not sent.
You can play with it by running : npx nx serve testing-nested
.
The goal is to test this behavior with Testing library and Cypress
The file named child.component.spec.ts
will let test your application using Testing Library. To run the test suits, you need to run npx nx test testing-nested
. You can also install 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-nested
to execute your test suits. You can add the --watch
flag to execute your test in watch mode.
I created some it
blocks but feel free to add more test if you like to.
- Fork the project
- clone it
- npm ci
npx nx serve testing-nested
to play with the applicationnpx nx test testing-nested
to test your application with Testing Librarynpx nx component-test testing-nested --watch
to test your application with Cypress- ...work on it
- Commit your work
- Submit a PR with a title beginning with Answer:18 that I will review and other dev can review.