Unit Testing

circle-exclamation
circle-check

Without automated tests:

  • every change is a challenge,

  • updating dependencies is too risky,

  • refactoring is inacceptable,

  • deployment is chaos,

  • ...

circle-check

JavaScript Unit-Test Frameworks

Jasmine

https://jasmine.github.io/arrow-up-right

Mocha

https://mochajs.org/arrow-up-right

Jest

https://jestjs.io/arrow-up-right

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.

http://www.wheresrhys.co.uk/fetch-mock/quickstartarrow-up-right

Last updated