Skip to content

Commit 4d443ae

Browse files
committed
fix(tests): clearing mocks after each test case
1 parent f2e88ae commit 4d443ae

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/backend/src/usagers/controllers/import/import.controller.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ describe("Import Controller", () => {
5858
controller = context.module.get<ImportController>(ImportController);
5959
});
6060

61+
beforeEach(() => {
62+
jest.clearAllMocks();
63+
});
64+
6165
afterAll(async () => {
6266
await AppTestHelper.tearDownTestApp(context);
6367
});

packages/backend/src/usagers/controllers/import/import.controller.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,8 @@ export class ImportController {
298298
await this.appLogsService.create<SuccessfulUsagerImportLogContext>({
299299
action: "IMPORT_USAGERS_SUCCESS",
300300
userId: user.id,
301+
structureId: user.structureId,
302+
role: user.role,
301303
context: {
302304
nombreActifs: extractUsagersNumber(usagersRows),
303305
nombreTotal: importPreviewRows.length,

0 commit comments

Comments
 (0)