mardi 2 juillet 2019

Is there any Node.js package that would allow me to mock MySql connection in order to test APIs that need db connection?

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 the table entries, 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?

Aucun commentaire:

Enregistrer un commentaire