Unit Testing
Unit-testing is not optional if you care about quality and your personal health.
Unit testing improves teams efficiency, applications quality and human lifespan.
Without automated tests:
every change is a challenge,
updating dependencies is too risky,
refactoring is inacceptable,
deployment is chaos,
...
Modularity is unit testing's best friend.
JavaScript Unit-Test Frameworks
Jasmine
Mocha
Jest
Jasmine
Example
Spies
Jasmine spies are mocks.
Fetch Mock
If you are using fetch
for HTTP requests, you can use fetch-mock
to mock these http requests.
Last updated