@wiremock/wiremock-testcontainers-node

0.0.1 • Public • Published

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();

Readme

Keywords

none

Package Sidebar

Install

npm i @wiremock/wiremock-testcontainers-node

Weekly Downloads

588

Version

0.0.1

License

Apache License v2

Unpacked Size

22.9 kB

Total Files

15

Last publish

Collaborators

  • infinidach
  • tomasbjerre
  • kurayami07734
  • ta-wiremock
  • rafewiremock
  • leeturner-wm