Jest testing examples project
In this project Jest is used with Webpack, Vanilla JS without a framework. The examples include:
- Expect (to be true/false/equal)
- Test setup/teardown (beforeEach, beforeAll, afterEach, afterAll)
- Spy (check on call method)
- Mock
- Async testing
- Coverage
it
andtest
can be used equally- does not matter if the test file is named
spec.js
ortest.js
Official jest documentation For matchers, go to jest-extended