In this course we want to focus on important testing techniques and practices. I'll avoid talking about
project
creation or test configuration
. If you don't have project to play with you can use the following repository template
where you have: I'll use that template in whole course. In addition you can read this
article
where we explain mentioned repo
. If you have your own app and tests configured - it's even better. You can try practices in your project and master them perfectly 📜.Running first time
Go to
repository
and click use template. After creating repo just clone it. Then type npm install --legacy-peer-deps
and use commands which you want. You can find them in README.md
file. They're are also explained below.How to run storybook for UI lib?
cd .system // changes directory
npx nx run figa-ui:storybook // runs storybook for UI library.
How to run tests?
cd .system // changes directory
npx nx run-many --target=test --projects=figa-hooks --watch // runs tests for figa-hooks library.
npx nx run-many --target=test --projects=figa-ui,figa-hooks --watch // runs tests for many libs.
npx nx run-many --target=test --watch // runs tests for every lib and app in monorepo.
How to run apps?
cd .system // changes directory
npx nx run-many --target=serve --all // runs all apps in monorepo.
npx nx run-many --parallel --target=serve --projects=blog,blog-creator // runs specified apps in monorepo.
- 1. Basics
10 minutes
Software testing
2 m
Grouping the tests
1 minute
The usage of describe and it
2 m
The best practices for naming tests
2 m
Types of tests
3 m
- 2. Mastering unit testing
31 minutes