Never mock an API again

Written by meeshkan | Published 2018/11/21
Tech Story Tags: testing | jest | unit-testing | jasmine | javascript

TLDRvia the TL;DR App

Why we use unmock for our full stack

Let’s face it, mocking sucks. Every programming language and platform has different tools to help you mock API calls, but all of them share some common fragilities:

  • No clean way to verify if the mocks are correct representations of the API.
  • No way to avoid reverse engineering the API you’re mocking.
  • No way to quickly mock internal APIs.
  • No way to monitor in production if the mocks from your tests resemble the data that you’re getting back in the wild.

As a result, teams lose tons of time and energy writing mocks for their unit and integration tests, which leads to buggy tests, less test coverage, and ultimately a less reliable production environment.

unmock

Enter unmock. Unmock is great because it basically takes care of all of this stuff for you. There is a good YouTube overview of the service (currently in closed beta), but I thought I’d walk you through how unmock speeds our team up at Meeshkan.


Published by HackerNoon on 2018/11/21