I am writing a Node.js application that acts as GraphQL server. And I want to test if GraphQL is giving me the right results.
My guess is to make a request to server in each test and then watch if it is right or not. But I'm not sure how to set it up, how to run the server and clean the database before all tests and shutting it down after all tests are finished.
I worked with rspec
using Ruby on Rails
before, so I want to do something like rspec
does in Node.js. Is there a way to accomplish it using Jest? And if not, how can I do something simular?
Aucun commentaire:
Enregistrer un commentaire