Example for custom file name
In the readme you say The file name is a timestamp, but feel free to rename it to something more rescriptive.
However, I don't see where this is possible. I'm trying to use this within mocha tests and would like to explicitly set the filename so that I have control of the fixture content in a CI environment to use scrubbed data. The tests do not use request, however, the library that is under test wraps up request as needed by the library.
Depends on your OS. On Linux and OS X you can use the mv command.
I was referring to something built in. In a similar way that nock permits.
You can change where the fixtures are stored by setting Replay.fixtures
Assaf, I think the poster means instead of the name 152063271234878036, it might be nice to have a name derrived from the test name or maybe the request URL.
Like if the first line of the file is: POST /api/v1/reservations/636550145738914944/confirm?restaurantId=041OGGZK4
Might use something like https://www.npmjs.com/package/slugify to generate something like this: POST_api_v1_reservations_636550145738914944_confirm__Q__restaurantId__EQ__041OGGZK4
I'm interested in forking project and implement feature of "slugified" fixtures names if nobody working on it. I think could be really an interesting feature.