Node Testing
Test Node APIs with Vitest and Supertest, including the database.
What you'll learn
- Unit test services
- Integration test routes with Supertest
- Use a test database with fixtures
- Run tests in CI
About this course
You write unit and integration tests for an Express API. You learn test databases, fixtures, mocking external services and running tests in CI.
Course curriculum
4 modules and 12 lessons over 3 weeks. Plan for about 9 learning hours.
01Unit testsWeek 1 · 3 lessons
- Vitest setup
- Testing services
- Mocks
02Route testsWeek 1 · 3 lessons
- Supertest
- Status and body checks
- Auth in tests
03DatabaseWeek 2 · 3 lessons
- Test database
- Fixtures and cleanup
- Transactions
04CIWeek 3 · 3 lessons
- GitHub Actions
- Coverage
- Exercise review
Project
Tested API. An Express API with unit and integration tests running in GitHub Actions.
Who this course is for
Node developers who ship APIs without tests.
Prerequisites
You build Express APIs with a database.
What's included
- 120-day course access
- Step-by-step lessons
- Practice files
- Reusable code templates
- A graded final exercise
- A digital completion certificate
Learning format
Self-paced practical course, part of our self-paced courses. Graded final exercise with written feedback.
Access and delivery
- Enrollment is activated within 15 minutes after payment.
- Final exercise feedback is delivered within 2 business days of submission, and the completion certificate is issued within 2 business days after passing the final exercise.
Certificate
You receive a digital completion certificate. Final exercise feedback is delivered within 2 business days of submission, and the completion certificate is issued within 2 business days after passing the final exercise.
Frequently asked questions
When does access start?
Enrollment is activated within 15 minutes after payment.
Is payment taken on this website?
No. After you submit your enrollment request, we reply by email with payment details and enrollment confirmation.
Does this course guarantee a job or income?
No. It is an education and training service and does not include employment, income or placement guarantees.
Can I cancel?
Our Refund and Cancellation Policy lists the terms for self-paced course programs.