{"library":"mountebank-test","title":"mountebank","description":"mountebank is the first open source tool for cross-platform, multi-protocol test doubles over the wire. It supports HTTP, HTTPS, TCP (text and binary), and SMTP protocols. Current stable version is 2.9.4, published under the @mbtest/mountebank package (was formerly mountebank). The community-driven project requires Node.js >=20. It offers mock verification, stubbing with advanced predicates, JavaScript injection, and record-playback through proxying, distinguishing itself from alternatives like WireMock by supporting multiple protocols and being fully open source without platform constraints. Releases are maintained by the mountebank-testing organization.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install mountebank-test"],"cli":{"name":"mountebank","version":null}},"imports":["import { spawn } from '@mbtest/mountebank';\nconst mb = spawn({ port: 2525 });","import { MountebankClient } from '@mbtest/mountebank/client';","import { Imposter } from '@mbtest/mountebank';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { spawn, Imposter, Stub } from '@mbtest/mountebank';\n\nconst mb = spawn({ port: 2525, loglevel: 'debug' });\nconst imposter = new Imposter({ port: 3000, protocol: 'http', name: 'test' });\nconst stub = new Stub().withPredicate({ equals: { path: '/api/data' } }).withResponse({ statusCode: 200, body: { data: 'success' } });\nawait mb.use(imposter);\nawait mb.start();\nconsole.log('mountebank running on port 2525');\n// ... use imposter ...\nawait mb.close();","lang":"typescript","description":"Creates and starts an HTTP imposter on port 3000 with a stub responding to /api/data.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}