Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add recorder much like nock has. #39

Open
CodisRedding opened this issue Aug 18, 2016 · 3 comments
Open

Add recorder much like nock has. #39

CodisRedding opened this issue Aug 18, 2016 · 3 comments

Comments

@CodisRedding
Copy link
Contributor

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.

@jbrumwell
Copy link
Owner

jbrumwell commented Aug 18, 2016

Is this what your thinking? https://github.com/node-nock/nock#recording, if so looks like an interesting feature.

@CodisRedding
Copy link
Contributor Author

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.

@jbrumwell
Copy link
Owner

jbrumwell commented Aug 18, 2016

That would be great :) you could use knex's query-response event, which should give you the sql query and the expected response 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants