Nodejs Express – unit testing/integration tests with Jest
Nodejs Express – unit testing/integration tests with Jest, available at $54.99, has an average rating of 4.43, with 62 lectures, based on 1473 reviews, and has 11776 subscribers.
You will learn about Learn how to make unit tests Learn how to make integration tests Learn how to create a Express REST API from scratch Learn how to build a Express REST API with test-driven development Learn how to mock Mongoose models in Nodejs with Jest Learn how to use Jest with TDD to build a REST API Learn how to use MongoDB with Mongoose together with Jest tests Learn how to write tests for error handling This course is ideal for individuals who are Students somewhat familiar with Nodejs who wants to learn how to make production-ready software with TDD It is particularly useful for Students somewhat familiar with Nodejs who wants to learn how to make production-ready software with TDD.
Enroll now: Nodejs Express – unit testing/integration tests with Jest
Summary
Title: Nodejs Express – unit testing/integration tests with Jest
Price: $54.99
Average Rating: 4.43
Number of Lectures: 62
Number of Published Lectures: 62
Number of Curriculum Items: 62
Number of Published Curriculum Objects: 62
Original Price: $199.99
Quality Status: approved
Status: Live
What You Will Learn
- Learn how to make unit tests
- Learn how to make integration tests
- Learn how to create a Express REST API from scratch
- Learn how to build a Express REST API with test-driven development
- Learn how to mock Mongoose models in Nodejs with Jest
- Learn how to use Jest with TDD to build a REST API
- Learn how to use MongoDB with Mongoose together with Jest tests
- Learn how to write tests for error handling
Who Should Attend
- Students somewhat familiar with Nodejs who wants to learn how to make production-ready software with TDD
Target Audiences
- Students somewhat familiar with Nodejs who wants to learn how to make production-ready software with TDD
Learn how to write a full CRUD REST API with Nodejs, Express and Jest using the test-driven development method!
TDD is becoming more and more of standard, and for good reasons!
With TDD, you can feel more safe and secure that any changes you make are not breaking existing functionality in your applications. Manual tests cannot be sustainable in large applications, or even medium applications. Plus, they’re incredibly tedious.
Without TDD… well, you know the story. You try to add functionality while trying to touch the existing code as little as possible, because you don’t want to break things unintentionally..
With TDD you won’t be scared to make big refactors in your code to clean up messy code, you will know quickly if you’ve broken any existing functionality!
I’ll show you step-by-step how to create a REST API with Express with unit tests and integration tests using the Jest test framework. There’s going to be lots of opportunities for you to work on your own and do some exercises as well for optimal learning!
If you have any questions or suggestions to the course, feel free to message me anytime, I love interacting with my students!
Course Curriculum
Chapter 1: Hello world Express And Jest in less than 10 minutes!
Lecture 1: Initialising project
Lecture 2: Hello World Express REST API in less than 5 mins!
Lecture 3: CRUD Methods we are going to build the TDD-way in REST
Lecture 4: Short intro to Jest + How to install Jest in our project
Chapter 2: Our first unit test with Jest
Lecture 1: Our first test with Jest and Express REST API
Lecture 2: Making our first test with Jest + Express REST API pass!
Lecture 3: Make Jest run automatically on file changes
Chapter 3: Our first unit tests for HTTP POST /todos
Lecture 1: Defining a data model for our Todo items with Mongoose
Lecture 2: Using jest.fn to mock our Mongoose model functions
Lecture 3: Making our test with Jest mock model pass
Lecture 4: How to configure Jest test environment
Lecture 5: How to mock Request and Response objects in Express API
Lecture 6: Writing test with mock Request object and making it pass!
Lecture 7: Using beforeEach in Jest tests
Lecture 8: Testing if response code is 201 and response is sent
Lecture 9: Test if response is sending back JSON body
Chapter 4: First integration test on HTTP POST /todos
Lecture 1: Creating our first integration test with Supertest and Jest
Lecture 2: How to make our Express app ready for integration testing
Lecture 3: Creating our Express Router
Lecture 4: How to debug tests in Jest
Lecture 5: Setting up Express JSON request body middleware
Lecture 6: Fix for address already in use error
Lecture 7: Making our controller function use async/await
Lecture 8: Setting up our MongoDB database in the cloud!
Lecture 9: Creating a MongoDB database user
Lecture 10: Connect to MongoDB database with Mongoose
Lecture 11: Modify our unit tests to use async/await
Lecture 12: Creating a server.js for running our Express REST API manually
Lecture 13: Manual Testing with Postman
Chapter 5: How to write error handling unit tests + integration tests
Lecture 1: Oops! We're missing error handling!
Lecture 2: Unit tests for error handling
Lecture 3: Making our error handling unit test PASS
Lecture 4: Creating a integration test for error handling
Lecture 5: Manual test for error handling
Lecture 6: Making a test for errors returning JSON body
Lecture 7: Create middleware to parse errors in JSON
Lecture 8: Making all of our tests pass and final manual test!
Chapter 6: HTTP GET on /todos route
Lecture 1: Intro + first test exercise
Lecture 2: Making first test for getTodos pass
Lecture 3: Test if TodoModel.find is called
Lecture 4: Test if response is being sent back correctly
Lecture 5: Test for error handling
Lecture 6: Integration test for GET /todos
Lecture 7: Manual test with Postman
Chapter 7: HTTP GET on /todos/:todoId
Lecture 1: Intro + Getting first test done
Lecture 2: Creating mock function TodoModel.findById and test for calls
Lecture 3: Exercise! Make test for response and make test pass!
Lecture 4: Solution to response testing with getById()
Lecture 5: Error handling unit test
Lecture 6: If TodoModel could not be found in database
Lecture 7: Integration test for GET /todos/:todoId
Lecture 8: 404 Integration test + final manual tests
Chapter 8: HTTP PUT /todos – the TDD way
Lecture 1: Intro to PUT method and first test
Lecture 2: Test if TodoModel.findByIdAndUpdate is called
Lecture 3: Test if PUT response is sent back
Lecture 4: Test HTTP PUT error handling
Lecture 5: HTTP PUT 404 test
Lecture 6: HTTP PUT Integration test
Chapter 9: HTTP DELETE
Lecture 1: Using Jest.mock instead of multiple Jest.fn + Intro to final challenge!
Lecture 2: Unit tests for HTTP Delete method
Lecture 3: Integration test for HTTP Delete Method + manual test + you are awesome!!
Lecture 4: BONUS – coupons for other courses
Instructors
-
Stefan Hyltoft
B.Eng Software Engineer
Rating Distribution
- 1 stars: 27 votes
- 2 stars: 30 votes
- 3 stars: 171 votes
- 4 stars: 512 votes
- 5 stars: 733 votes
Frequently Asked Questions
How long do I have access to the course materials?
You can view and review the lecture materials indefinitely, like an on-demand channel.
Can I take my courses with me wherever I go?
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don’t have an internet connection, some instructors also let their students download course lectures. That’s up to the instructor though, so make sure you get on their good side!
You may also like
- Top 10 Video Editing Courses to Learn in November 2024
- Top 10 Music Production Courses to Learn in November 2024
- Top 10 Animation Courses to Learn in November 2024
- Top 10 Digital Illustration Courses to Learn in November 2024
- Top 10 Renewable Energy Courses to Learn in November 2024
- Top 10 Sustainable Living Courses to Learn in November 2024
- Top 10 Ethical AI Courses to Learn in November 2024
- Top 10 Cybersecurity Fundamentals Courses to Learn in November 2024
- Top 10 Smart Home Technology Courses to Learn in November 2024
- Top 10 Holistic Health Courses to Learn in November 2024
- Top 10 Nutrition And Diet Planning Courses to Learn in November 2024
- Top 10 Yoga Instruction Courses to Learn in November 2024
- Top 10 Stress Management Courses to Learn in November 2024
- Top 10 Mindfulness Meditation Courses to Learn in November 2024
- Top 10 Life Coaching Courses to Learn in November 2024
- Top 10 Career Development Courses to Learn in November 2024
- Top 10 Relationship Building Courses to Learn in November 2024
- Top 10 Parenting Skills Courses to Learn in November 2024
- Top 10 Home Improvement Courses to Learn in November 2024
- Top 10 Gardening Courses to Learn in November 2024