We use Sinon to mock Typescript modules by using mockModule to create a function that can mock the given module. This is done at the outer-most scope of our test suite so that this
This method helped me quickly determine the minimum data required to drive the front-end. That has directly driven the back-end code, reducing refactoring time and preventing unnec
With mocks for dependencies inside functions, unit tests will be resilient to a changing codebase. And functions with mocks can be developed without a chain of dependencies.