JSPM

testcontainers

1.1.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2008668
  • Score
    100M100P100Q216193F
  • License MIT

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.

Package Exports

  • testcontainers

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (testcontainers) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

TestContainers

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.

Build Status

Install

npm i -D testcontainers

Usage

Run your app with the DEBUG=testcontainers env variable set to see debug output.

Example

const redis = require("async-redis");
const { GenericContainer } = require("testcontainers");

(async () => {
  const container = await new GenericContainer("redis")
    .withExposedPorts(6379)
    .start();

  const redisClient = redis.createClient(container.getMappedPort(6379));
  await redisClient.quit();

  await container.stop();
})();