Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Nodejs Express - unit testing/integration tests with Jest
Rating: 4.6 out of 5(1,658 ratings)
12,799 students

Nodejs Express - unit testing/integration tests with Jest

Learn to build a full CRUD REST API with Nodejs using TDD in Jest in JavaScript, with unit testing and integration test
Created byStefan Hyltoft
Last updated 11/2019
English

What you'll 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

Course content

9 sections62 lectures2h 47m total length
  • Initialising project1:18

    Learn how to initialise our NodeJs Express test-driven development project with Jest

  • Hello World Express REST API in less than 5 mins!3:50

    Learn how to create a simple Nodejs Express REST API in just 10 minutes!

  • CRUD Methods we are going to build the TDD-way in REST1:30

    A brieft introduction to the various REST HTTP Methods we can use inside the Nodejs Express REST API.

  • Short intro to Jest + How to install Jest in our project0:39

    How to install Jest to use with Nodejs Express for test-driven development

Requirements

  • Basic JavaScript ES6
  • Some familiarity with Nodejs Express is a plus

Description

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!

Who this course is for:

  • Students somewhat familiar with Nodejs who wants to learn how to make production-ready software with TDD