What is the best way to test this?
Kogs opened this issue · comments
Marcel Vogel commented
I'm wondering how to write tests for this kind of express/typorm project setup.
How to mock the Repositories?
Any ideas/recommendations?
Olivier Gauthier-Farley commented
good question^
Marcel Vogel commented
It's not testable like that. What I did was writing 'business objects' that use internally TypeOrm Repositories. This BO classes then can get mocked so there is no database connection required.