I'm creating an API as a study. I'm very new to programming. I wanted to unit test the controller layer using mocha. I'm using dependency injection with the tsyringe library. In the test I wanted to stub the service layer, and apparently it's not working.
So the test is not working. I tried countless ways, and perhaps due to lack of knowledge, none of them worked. What would be the correct way to implement this test?
something like this should work..