[Express] How can I test that my routes return the expected response in a more automatic way?

This page summarizes the projects mentioned and recommended in the original post on /r/learnjavascript

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • tape

    tap-producing test harness for node and browsers

  • I am familiar with unit testing (using Tape). But if I understand correctly, things like HTTP requests fall more in the category of integration testing, rather than unit testing?

  • postman-app-support

    Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.

  • Hi all. I've built an Express app with a three routes: one route for user registration, another route for user login, and a third route which requires the user to be authorized. Currently, to make sure all routes are working as expected, I have to open a third party app which can send HTTP requests (like Postman), use it to manually make several POST and GET requests to my routes, and visually confirm the correct responses are returned. Testing in this way is getting a bit tedious. How can I automate this process so I don't have to manually carry out these tasks every time I make an edit?

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts