0.0.1 • Published 6 months ago

@wiremock/wiremock-testcontainers-node v0.0.1

Weekly downloads
-
License
Apache License v2
Repository
-
Last release
6 months ago

wiremock-testcontainers-node

WireMock module for Testcontainers for NodeJS

Usage

npm install wiremock-testcontainers-node

Add a stub mapping json file (eg. mapping.json)

import { WireMockContainer } from "wiremock-testcontainers-node";
const container = await new WireMockContainer()
  .withMapping("./mapping.json")
  .withExposedPorts(8080)
  .start();
const { output, exitCode } = await container.exec([
  "curl",
  "http://localhost:8080/hello",
]);

console.log(output);

await container.stop();
0.0.1

6 months ago