So I wanted to compare the 2 main styles for writing typescript servers and testing the code.
-
Using jest.mock
-
Writing code with dependency injection.
-
Hybried.
( As it seems I am not the only one who compared - https://gist.github.com/ryyppy/e60376024aa9e4fe2962f3ab13e87bf0 )