Currently, many of the Gardener tests use custom, promitive mocking mechanism. An example of that can be found in ExecuteReadyRequestsUseCase.spec.ts . They look like this:
const fetchDataUseCase = () => ({ fetchData: () => Promise.resolve('fetchedData'), });
In scope of this task, refactor entire gardener-server codebase to use some standard mock mechanism instead. A specific technnique to be used is left to be researched but this looks promising: https://jestjs.io/docs/en/es6-class-mocks#automatic-mock .
Currently, many of the Gardener tests use custom, promitive mocking mechanism. An example of that can be found in
ExecuteReadyRequestsUseCase.spec.ts
. They look like this:const fetchDataUseCase = () => ({ fetchData: () => Promise.resolve('fetchedData'), });
In scope of this task, refactor entire
gardener-server
codebase to use some standard mock mechanism instead. A specific technnique to be used is left to be researched but this looks promising: https://jestjs.io/docs/en/es6-class-mocks#automatic-mock .