3 ms·
This looks really beautiful. What use cases would this be helpful for?
by endroits1 9y ago
This looks really beautiful. What use cases would this be helpful for?
- vortico 9y agoThis project is really cool for me. Here's my personal use case that it would solve. I always begin every Node/Express server project with a unit and integration test file using the request-sync library to make a sequence of synchronous requests and assert everything about each request in each step before continuing. But I can never run those scripts to completion until my server is written, which is much more difficult to test than my test script. (Yes, I'm looking for a meta-test of my test script.) Questions like "am I checking the data in the correct way" and "are all my status code checks the correct number" would be answered if I could make a fake server first, then a unit test, then the real server. It's easier to make example data than to write a script to check everything in generality if I don't know exactly how the server should behave.
- 255kb 9y agoThank you! I have a use case at work where I work exclusively on a frontend application. And sometimes I need to mock new API routes not developed yet by the backend team. I could hardcode some things directly in the application but mocking with an external tool is more convenient.