🚨 AtomicJar is now part of Docker 🐋! Read the blog

Documentation

Node.js

Community Module

These modules are maintained by the community, outside of the Testcontainers project.

Description

Playwright enables reliable end-to-end testing for modern web apps.

Examples

Dependency:
Usage:
import path from "path";
import { PlaywrightContainer } from "testcontainers-node-playwright";

const PLAYWRIGHT_PROJECT_TESTS_TO_RUN_INTO_THE_CONTAINER = path.resolve(__dirname, "..", "example-project");

const startedPlaywrightContainer = await new PlaywrightContainer(
  "mcr.microsoft.com/playwright:v1.44.0-jammy",
  PLAYWRIGHT_PROJECT_TESTS_TO_RUN_INTO_THE_CONTAINER,
).start();

const { output, exitCode } = await startedPlaywrightContainer.exec(["npx", "playwright", "test"]);