Express API Testing

This page summarizes the projects mentioned and recommended in the original post on reddit.com/r/node

Our great sponsors
  • Appwrite - The Open Source Firebase alternative introduces iOS support
  • Sonar - Write Clean JavaScript Code. Always.
  • InfluxDB - Access the most powerful time series database as a service
  • ONLYOFFICE ONLYOFFICE Docs — document collaboration in your environment
  • CodiumAI - TestGPT | Generating meaningful tests for busy devs
  • supertest

    🕷 Super-agent driven library for testing node.js HTTP servers using a fluent API. Maintained for @forwardemail, @ladjs, @spamscanner, @breejs, @cabinjs, and @lassjs.

    Supertest is quite popular and easy to use test tool, you can do integration and E2E test as well, you just need to pass it the server instance or a string to make a request and assert over the response.

  • nodejs-integration-tests-best-practices

    ✅ Beyond the basics of Node.js testing. Including a super-comprehensive best practices list and an example app (April 2022)

  • Appwrite

    Appwrite - The Open Source Firebase alternative introduces iOS support . Appwrite is an open source backend server that helps you build native iOS applications much faster with realtime APIs for authentication, databases, files storage, cloud functions and much more!

  • ava

    Node.js test runner that lets you develop with confidence 🚀

    Last but not least important are ava, uvu and tape; they are a really light and fast test runners.

  • vitest

    A Vite-native test framework. It's fast!

    Vitest is a close competitor to Jest, it's faster and younger than jest, and it use vite under the hood to work, so for pure Node.js apps (100% backend) could have some caveats with ES modules.

  • uvu

    uvu is an extremely fast and lightweight test runner for Node.js and the browser

    Last but not least important are ava, uvu and tape; they are a really light and fast test runners.

  • tape

    tap-producing test harness for node and browsers

    Last but not least important are ava, uvu and tape; they are a really light and fast test runners.

  • Sinon.JS

    Test spies, stubs and mocks for JavaScript.

    Mocha is a test runner, Chai is an assertion library, Sinon is a mocking library, this normally the combination you would need to use if you choose mocha, but there are others.

  • Sonar

    Write Clean JavaScript Code. Always.. Sonar helps you commit clean code every time. With over 300 unique rules to find JavaScript bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work.

  • pactum

    REST API Testing Tool for all levels in a Test Pyramid

    Pactum is quite powerful allowing different kind of E2E tests, you pass the base URL to make a request and assert over the response, it has more assertion functions than supertest and also supports GraphQL

  • chai-http

    HTTP Response assertions for the Chai Assertion Library.

    chai-http adds the capability to make HTTP requests to Chai while keep using the assertion functions from Chai

  • fakeshop-api

    Minimal API RESTful with MongoDB and tested with Jest

    Integration test with jest and supertest E2E test with jest and Pactum

  • mocha

    ☕️ simple, flexible, fun javascript test framework for node.js & the browser

    Mocha is a test runner, Chai is an assertion library, Sinon is a mocking library, this normally the combination you would need to use if you choose mocha, but there are others.

  • nest-api-example

    Example of an Restful API with Nest.js and TypeORM

    Integration test with jest and supertest E2E test with jest and Pactum

  • jest

    Delightful JavaScript Testing.

    Jest is a test framework because it already includes the test runner, assertion and mocking functions, it's quite popular because you don't need to wire anything to start executing tests, but it has some caveats

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