mockyeah

A powerful service mocking, recording, and playback utility.

Notice: These docs are for mockyeah 1.x & above. For legacy mockyeah 0.x, please see https://mockyeah.github.io/mockyeah/.

Compare

There are several tools that share some goals and use cases with mockyeah.

You might be familiar with nock - it works great for mocking in server-side or other Node apps, and in unit tests. But it's not designed to work with client-side apps, and doesn't provide an actual server for mocked responses. mockyeah can do all of the above and more, all with the same syntax!

You might also be familiar with Polly.JS - like mockyeah, it supports both client and server-side mocking. It's a great tool, but its design seems more oriented around automatically recording and replaying known requests, and to initiate recording requires configuration in app source code, which means rebuilding or redeploying your app just to be able to record.

Here's an attempt to map out some of their features to help compare:

mockyeahPolly.JSnockfetch-mockpretender
browser support
Node.js support
Recording suites
Shareable recordings
Hot-reloading client-side suites🚧
CLI dynamic record & play (server)
CLI dynamic record (client)
CLI dynamic play (client)🚧
CLI record groups
Pass-thru/proxy
Pass-thru as default❌❓
Real server
Programmatic mocked responses
Delay mocked response
Default delay
Modify real responses❌❓
Delay real response
Domain aliases
Record to disk
Record to disk from client-side
Record to local storage🚧
fetch mocking
XHR mocking🚧
Events🚧❌❓❌❓❌❓
Middleware🚧❌❓❌❓
Dynamic mock opt-in (server)
nth mocking🚧
Sessions🚧
Browser extension
Unit test libraries
Unit test assertions
Declarative request matching (more than path)
Programmatic request matching❌❓
GraphQL-aware mocking🚧

© 2020 mockyeah, Built with Gatsby