I want to do unit testing of a few APIs written by myself, which make some queries on a MySQL database. But I learned recently that establishing an actual connection during testing is not a good practice and the test cases for the APIs would modify, delete, or insert into the tables, which I don't want to happen.

I found that there is a node package called mockgoose which does the same thing for MongoDB. Is there something similar for MySQL?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.