mock-knex
mock-knex copied to clipboard
Add recorder much like nock has.
I was thinking that it would be a useful addition to add a .record() function, that would record the unmocked db calls and output the mock-knex code needed to mock those same calls.
Is this what your thinking? https://github.com/node-nock/nock#recording, if so looks like an interesting feature.
Yeah. That's it. It's been really useful for http calls. When I find some time I'd like to explore it a bit.
That would be great :) you could use knex's query-response
event, which should give you the sql query and the expected response :+1: