diff --git a/src/test/javascript/spec/component/shared/metis/answer-post/answer-post.component.spec.ts b/src/test/javascript/spec/component/shared/metis/answer-post/answer-post.component.spec.ts index 2d8c8caa6930..a3d3692660bf 100644 --- a/src/test/javascript/spec/component/shared/metis/answer-post/answer-post.component.spec.ts +++ b/src/test/javascript/spec/component/shared/metis/answer-post/answer-post.component.spec.ts @@ -210,7 +210,12 @@ describe('AnswerPostComponent', () => { expect(component.showDropdown).toBe(showDropdown); expect(component.dropdownPosition).toEqual(dropdownPosition); - jest.restoreAllMocks(); - }); +afterEach(() => { + jest.restoreAllMocks(); +}); + +testCases.forEach(({ cursor, preventDefaultCalled, showDropdown, dropdownPosition }) => { + // ... test implementation ... +}); }); });