refactor: controller tests (#18100)

This commit is contained in:
Jason Rasmussen
2025-05-05 18:57:32 -04:00
committed by GitHub
parent df2cf5d106
commit f34f83e164
15 changed files with 183 additions and 101 deletions

View File

@@ -6,15 +6,15 @@ import { ControllerContext, controllerSetup, mockBaseService } from 'test/utils'
describe(SearchController.name, () => {
let ctx: ControllerContext;
const service = mockBaseService(SearchService);
beforeAll(async () => {
ctx = await controllerSetup(SearchController, [
{ provide: SearchService, useValue: mockBaseService(SearchService) },
]);
ctx = await controllerSetup(SearchController, [{ provide: SearchService, useValue: service }]);
return () => ctx.close();
});
beforeEach(() => {
service.resetAllMocks();
ctx.reset();
});