How can I change my mindset about writing unit tests, e2e tests, etc. and actually enjoy it?

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
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • javascript-testing-best-practices

    📗🌐 🚢 Comprehensive and exhaustive JavaScript & Node.js testing best practices (July 2023)

  • I started reading https://github.com/goldbergyoni/javascript-testing-best-practices and thought that this would help change my mindset about tests. Although I feel like I can write better tests, I still feel unmotivated and get tired easily after writing a few unit tests.

  • testcontainers-node

    Testcontainers is a NodeJS library that supports tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.

  • I usually do integration tests at first, using testcontainers and load a raw SQL file with mock data at container startup, at integration tests i do http calls to endpoints but not testing any method in specific, and separate to that i do unit tests but only for pure functions that have a business logic. Then use husky and git hooks to run all tests before commits, and on CI run unit tests only.

  • 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