peeky
peeky copied to clipboard
Mock network
Hi peeky π± !
Is it possible to catch and mock natively mousy http requests for component testing ?
What do you mean by "mousy http requests"?
It's a joke. πΌπΉπ I mean to be able to stub http request. And what could be awesome, to be a proxy for the first time and request the back end server, and save the response. Then, on rerun, what is return is the snapshot of the preceding request, and so, the test is runnable in CICD using real data.
πΉ
An inspiration for network mocking : https://github.com/BedrockStreaming/superagent-mock
Also a great solution: https://github.com/nock/nock
Leveraging https://mswjs.io/ might make it easy for node and browser environments.