Currently when writing unit tests for a service when I create the module I have to specify all of the dependencies present in the service's constructor otherwise the test suite fails. Is there a way to only import only the dependencies which are of concern during testing or is this the only way.
Also when I'm writing tests for different cases I'm creating new mocks every time because of the needs of the test case. Should I create a factory for those mocks? And if yes where is it a good place to keep them? I currently keep them in test/mocks which is on the same level as src.
Another problem I've came across is suppose I want to mock the resolved value of a function within the service I'm writing the tests for. But that function is private and I cannot access it in my test file. The way I solved it is I created a MockService class and overrode those methods as public. Is this a viable solution and are there better ways to do it?