mirror of
https://github.com/immich-app/immich.git
synced 2025-12-27 01:11:42 +03:00
refactor: controller tests (#18100)
This commit is contained in:
@@ -6,15 +6,15 @@ import { ControllerContext, controllerSetup, mockBaseService } from 'test/utils'
|
||||
|
||||
describe(ActivityController.name, () => {
|
||||
let ctx: ControllerContext;
|
||||
const service = mockBaseService(ActivityService);
|
||||
|
||||
beforeAll(async () => {
|
||||
ctx = await controllerSetup(ActivityController, [
|
||||
{ provide: ActivityService, useValue: mockBaseService(ActivityService) },
|
||||
]);
|
||||
ctx = await controllerSetup(ActivityController, [{ provide: ActivityService, useValue: service }]);
|
||||
return () => ctx.close();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
service.resetAllMocks();
|
||||
ctx.reset();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user