Closed oliviasculley closed 11 months ago
I've really enjoyed utilizing [VCR]() with Rails to record responses from live APIs with built-in means to update them. This helps to prevent the issue of mocks becoming out-of-sync with prod from being an issue and giving devs very representative data to test with.
It looks like VCR has a node port named Talkback that would check this box. I have a prototype sort of set up: https://github.com/hackgvl/open-map-data-multi-layers-demo/compare/stable...ThorntonMatthewD:open-map-data-multi-layers-demo:MattT/mock-responses-talkback
I haven't worked much work with Vue, so I'm not entirely sure what the best practice is for where to stash test files and configs. I feel like I'm sort of littering the root folder at the moment and would like to relocate some of the new files. Do you have a preference where test configuration files should live?
I don't personally have any preferences, but I'd prefer us to follow whatever conventions are in place with Vue's community since we're using their stuff. I think https://vuejs.org/guide/scaling-up/testing.html might describe some conventions, but if not, we can just look at what other Vue projects do.
Using something like Talkback that could let us easily not just mock but update the mocks sounds fantastic!
Thank you! I will keep digging around and seeing what looks good.
I've moved the tests into a single folder that has a hierarchy that resembles what is up in src
for the regular application code. The configs and tapes have been placed into that folder, and now things look a lot more contained.
Mock/intercept data.openupstate.org api calls to prevent them from affecting the tests
Need to mock in: