From 14f311d0403926c1f15b71a4e87787092aefd136 Mon Sep 17 00:00:00 2001 From: XnpioChV Date: Mon, 16 Dec 2024 11:19:11 -0500 Subject: [PATCH] style: Nits on the code test --- src/editors/AdvancedEditor.test.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/editors/AdvancedEditor.test.tsx b/src/editors/AdvancedEditor.test.tsx index d070e8129..741ae9cfb 100644 --- a/src/editors/AdvancedEditor.test.tsx +++ b/src/editors/AdvancedEditor.test.tsx @@ -3,12 +3,11 @@ import { getConfig } from '@edx/frontend-platform'; import { render, initializeMocks, - waitFor, } from '../testUtils'; import AdvancedEditor from './AdvancedEditor'; -jest.mock('../library-authoring/LibraryBlock', () => ({ - LibraryBlock: jest.fn(() => (
Advanced Editor Iframe
)), +jest.mock('./containers/EditorContainer', () => ({ + EditorModalWrapper: jest.fn(() => (
Advanced Editor Iframe
)), })); describe('AdvancedEditor', () => { @@ -28,9 +27,7 @@ describe('AdvancedEditor', () => { window.dispatchEvent(messageEvent); - waitFor(() => { - expect(onCloseMock).toHaveBeenCalled(); - }); + expect(onCloseMock).toHaveBeenCalled(); }); it('should not call onClose if the message is from an invalid origin', () => {