-
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.
-
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.
Luckily, Testcontainers is a great project that makes setting up external resources more comfortable by providing a programmatic interface to run Docker containers in testing scenarios. In this article, we'll be looking at a community port of Testcontainers for Node.js (testcontainers-node), and how we can run tests that rely on both a single Redis and a Redis Cluster.
The examples below will leverage mocha as a test runner, chai as an assertion library, and ioredis as our backing Redis client.
Before you go any further, you can skip this article altogether and go straight to some working examples on GitHub if that's more your style.