Unit Test
Rules
Avoid fixtures
that are defined outside of the test suite as a common fixture and used in multiple suites.
- Compromises the test isolation.
- Makes it hard to change.
Debugging
When debugging a Jest test, console.log
in the actual implementation, not in the test.
Commands
Testing specific assertion:
jest some_test.test.js -t "expression matcher for a test description"