I used to write tests with both Jest or Mocha/Chai. I am starting a new project and want to go with the TDD approach. I checked the testing pyramid and also some other concepts and came up with this set of questions assuming that I am going to create a set of microservices with REST API and using Jest for testing:
Which is the best approach to start TDD and what kind of tests to write (unit, integration)
Which is a better solution
Mock the DB interactionsorhave a test DB? Why?Are there any good libraries that can be used with
Jestto help the code be more elegant or Jest ecosystem allows to do that without any external library?Are there any better patterns than
testing pyramidto approach conceptually to this question ?
Thanks in advance
Aucun commentaire:
Enregistrer un commentaire