Understand Testing With ExpressJS, In Practice



How to write unit and end-to-end tests, following Test-Driven-Development, and define a good testing strategy.


What you will learn

How to write unit tests for an ExpressJS application

Testing good practices

Basics of Mocks and Spies

End-to-End tests for an API

How to structure an ExpressJS project

What is a good testing strategy

Make use of SuperTest

Description

Testing is a must-known and valuable skill in software development.


With an ecosystem growing quickly, several similar tools and few courses or lacking knowledge on the field, my journey with testing has not been the easiest one. Now that I took the right choices and practiced for several years, I want to share my expertise so you become able to write tests the right way !

There is not a single valid reason to avoid tests for your back-end application. Here, you will discover the strength of the feedback-loop given by Test Driven Development, and how tests make your life easier as a whole.

What are we going to build ?

Inside this free course, you will build a quality to-do application, with ExpressJS and TypeScript. You will learn how to test it properly, including unit and end-to-end tests.

‘;
}});

You will follow Test Driven Development alongside me and finally understand testing. As a bonus, you will learn how to structure a basic application.

Featuring :

  • ExpressJS with TypeScript
  • Jest and SuperTest
  • Database with Postgres and Prisma
  • Validation with class-validator
  • Custom errors
  • Test Driven Development-Style

What this course is not

This won’t be a deep-dive into ExpressJS itself, or APIs like jest and supertest.

Introduction

Testing Theory
Before We Begin…
Summary & Example application
To Test or Not To Test

Unit Testing Endpoints – Part 1

First Basic Test
First Endpoint Test
Project Setup
Tests Setup
First Endpoint Test

Mocking & Spy

Mocking
Complete Endpoint Test
Spy

Validation

Creating the TODO module
Validation – Part 1
Exceptions
Validation – Part 2

Unit Testing Endpoints – Part 2

Complete First Endpoint
Improve Unit Tests
Complete Second Endpoint

End-to-End Tests

E2E Tests Setup
Complete E2E Tests

Conclusion

Testing CheatSheet
Conclusion

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
Best Wordpress Adblock Detecting Plugin | CHP Adblock

Check Today's 30+ Free Courses on Telegram!

X