Node.js testing app tutorial showing capabities of Jest testing library
This app helps us to build a simple Node.js testing setup with Jest. It covers pure function tests, async tests, and mocking both external libraries and local modules.
- Prerequisites
Node.js (v20+ works)
npm
Terminal + Code editor
- Exectute test
All tests:
npm test
With coverage:
npm test -- --coverage
Watch mode (optional):
npm run test:watch