Download Latest Version v12.0.0 source code.tar.gz (459.4 kB)
Email in envelope

Get an email when there's a new version of Testcontainers node

Home / v12.0.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-05-19 2.6 kB
v12.0.0 source code.tar.gz 2026-05-19 459.4 kB
v12.0.0 source code.zip 2026-05-19 783.3 kB
Totals: 3 Items   1.2 MB 4

🚨 Breaking Changes

  1. Node 20 is EOL. Minimum engine requirement is now >= 22.22, matching the constraints from our dependencies.

  2. Previously, when no wait strategy was configured, Testcontainers defaulted to Wait.forListeningPorts().

The new default wait strategy uses a Docker healthcheck when one is configured on the container image or service, falling back to Wait.forListeningPorts() when no healthcheck is available.

To keep the previous behaviour, configure Wait.forListeningPorts() explicitly: ```ts import { DockerComposeEnvironment, GenericContainer, Wait } from "testcontainers";

// Container: opt back into the previous default of waiting for listening ports
const container = await new GenericContainer("my-image:latest")
  .withExposedPorts(8080)
  .withWaitStrategy(Wait.forListeningPorts())
  .start();

// Compose: apply the previous default to all services
const environment = await new DockerComposeEnvironment(composeFilePath, "docker-compose.yml")
  .withDefaultWaitStrategy(Wait.forListeningPorts())
  .up();

// Compose: or apply it to a specific compose container
const environment = await new DockerComposeEnvironment(composeFilePath, "docker-compose.yml")
  .withWaitStrategy("api-1", Wait.forListeningPorts())
  .up();
```

Changes

🚀 Features

  • Use configured health checks as the default wait strategy @digital88 (#1096)

🐛 Bug Fixes

  • Read RYUK_CONTAINER_IMAGE lazily so dotenv / other runtime overrides work @dvirarad (#1323)
  • Use /tmp for Kafka startup script @cristianrgreco (#1302)

📖 Documentation

  • Clarify PR defaults in AGENTS.md @cristianrgreco (#1303)

🧹 Maintenance

  • Repair npm publish version updates @cristianrgreco (#1330)

📦 Dependency Updates

Source: README.md, updated 2026-05-19