Open KayleighYum opened 6 months ago
Hi @KayleighYum Thank you for opening this issue. It is already possible to do whatever recording you need by implementing the hook function in the config. You can, for example, store in a file the information you want to check about each request, or if you run kassette from the same process as your (node.js-based) test runner, you can even do the recording in a js object in memory only and access the same object from your test. Would this work for your use case?
Hi @divdavem we currently have a worker running the mock server and another one running our tests. We're have specified certain endpoints to the mock server to return/alter state that we're storing in the mock server. This is working fine but we were wondering if this could be improved.
Previous iterations of this was using the onListen hook to start up a readiness server and then used that server for state management.
Thank you for your answer!
This is working fine but we were wondering if this could be improved.
I like the way you implemented it. :+1: How would you improve it? What would you expect from the improved solution?
Currently we're using the hook method to check if the place starts with certain keywords, wrapping the state in a payload and using the hook to return the response from the payload. It's a very hardcoded if/else statement that could become finicky later on
It would be great if it could come from the package for others to use. Is this something that is in scope?
Would it be possible to support recording all calls made to the server? The recording would store the request url, method and body (if exists) The reasons for this would be: