Skip to main content

Tag: Mock-Inspect

mock-inspect: A simple way to achieve contract testing

This article is part of a series about the open-source Node.js testing library _mock-inspect_ of which I am the main contributor and author. Check out the entire series here! In last week’s article, we discussed how we can use mock-inspect to assert if and how the application under test makes network requests to API endpoints while simultaneously mocking out their responses. This week we are going to explore how we can use mock-inspect to implement a contract testing strategy without complicated frameworks like PACT.

mock-inspect: Mock network requests and observe how these requests were made

This article is part of a series about the open-source Node.js testing library mock-inspect of which I am the main contributor and author. Check out the entire series here! mock-inspect is an open-source library for Node.js which allows you to mock network requests in your tests and to inspect how these requests have been made in the application. Has the endpoint been called? Which request body and request headers did the application pass along?