lundi 18 janvier 2021

jest - run one test-module with different test setup multiple times

There is an application running on NodeJS. Its architecture is inspired by Oncle Bob's book: "Clean Architecture". All works perfectly, but: At the moment we have unit-tests for all of our modules running with the fake-DB. We want to do integration-tests in that way: use the same tests (as we used for unit-tests) for integration tests but "inject" the real DB. How could I do that with jest? I don't want to copy all the unit-test code and create code duplication (except for the test-setup).

Aucun commentaire:

Enregistrer un commentaire