{"id":15849430,"url":"https://github.com/osukaa/mountebank-test","last_synced_at":"2026-01-12T06:45:48.608Z","repository":{"id":42831944,"uuid":"265454649","full_name":"osukaa/mountebank-test","owner":"osukaa","description":"Testing mountebank as local dependency and in process","archived":false,"fork":false,"pushed_at":"2022-12-12T20:22:22.000Z","size":769,"stargazers_count":0,"open_issues_count":13,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-07T11:52:46.901Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/osukaa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-20T04:47:52.000Z","updated_at":"2020-05-20T05:56:03.000Z","dependencies_parsed_at":"2023-01-28T00:40:11.686Z","dependency_job_id":null,"html_url":"https://github.com/osukaa/mountebank-test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osukaa%2Fmountebank-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osukaa%2Fmountebank-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osukaa%2Fmountebank-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osukaa%2Fmountebank-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osukaa","download_url":"https://codeload.github.com/osukaa/mountebank-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246689476,"owners_count":20818129,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-05T18:41:12.615Z","updated_at":"2026-01-12T06:45:48.581Z","avatar_url":"https://github.com/osukaa.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mountebank-test\nTesting mountebank as local dependency and in process\n\nTrying to run [`mountebank`](http://www.mbtest.org/) as an in-process mock library for node.js tests.\n\n## Setup\n\n1. `server.js` - starts a server\n2. `index.js` - setups a hapi server\n3. `test.js` - ava tests against mountebank\n4. `imposter.js` - fluent api for creating an imposter in the mountebank server\n5. `imposters.ejs` - mountebank config file loaded through a flag in the CLI\n\n## running `npm test`\n\nRunning `npm test` will start a mountebank instance as default, building on the example from the [mountebank book](https://www.manning.com/books/testing-microservices-with-mountebank).\n\n```\nhttps://github.com/bbyars/mountebank-in-action/blob/master/ch09/webFacadeService/serviceTest/test.js\n```\n\n## running `npm run mb`\n\nThis will start a mountebank instance as per standard procedure, will use `imposters.ejs` through the flag `--configfile`.\n\n\u003e This will run mountebank in a separate process.\n\nYou can then open another terminal and run `npm start` and try doing a curl against `/testing` endpoint\n\n```\n$ curl \u003chost_port\u003e/testing\n```\n\nand will get a response back\n\n```json\n{\n  \"data\": {\n    \"products\": [\n      {\n        \"id\": \"id-1\",\n        \"name\": \"name-1\",\n        \"description\": \"description-1\"\n      }\n    ]\n  },\n  \"headers\": {\n    \"content-type\": \"application/json\",\n    \"connection\": \"close\",\n    \"date\": \"Wed, 20 May 2020 05:49:59 GMT\",\n    \"transfer-encoding\": \"chunked\"\n  }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosukaa%2Fmountebank-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosukaa%2Fmountebank-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosukaa%2Fmountebank-test/lists"}