Skip to content

Simple to spin up docker containers for integration testing

Notifications You must be signed in to change notification settings

valkyrjs/testcontainers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test Containers

Test container solution for running third party solutions through docker.

Quick Start

import { PostgresTestContainer } from "@valkyr/testcontainers/postgres";

const container = await PostgresTestContainer.start("postgres:16");

await container.create("db");
await container.client("db")`SELECT 1`;

console.log(container.url("db")); // => postgres://postgres:postgres@127.0.0.1:5432/db

await container.stop();

About

Simple to spin up docker containers for integration testing

Resources

Stars

Watchers

Forks