Unit testing: What to use, and how?

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

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

    tap-producing test harness for node and browsers

  • A more minimalist approach is this tape module and the TAP protocol. https://www.npmjs.com/package/tape

  • ava

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

  • I've had some good experiences with Ava + Sinon. I've personally disliked Jest because it seemed to do some weird trickery in the background that prevented me from using ES modules.

  • 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
  • Sinon.JS

    Test spies, stubs and mocks for JavaScript.

  • I've had some good experiences with Ava + Sinon. I've personally disliked Jest because it seemed to do some weird trickery in the background that prevented me from using ES modules.

  • utap

    Micro TAP formatter

  • I'm using Node's builtin on my current project, and while it's fine, it feels somewhat barebones. Could be just the fact that it only does TAP output, but I've had to pull in an extra dependency for output formatting ( utap is nice ) and work out some kinks, like adding a custom assert message to assert.deepEquals removes the diff from the error message.

  • Prisma

    Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS 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