Skip to content

Commit

Permalink
style: Nits on the code test
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisChV committed Dec 16, 2024
1 parent c0f84ab commit 14f311d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/editors/AdvancedEditor.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => (<div>Advanced Editor Iframe</div>)),
jest.mock('./containers/EditorContainer', () => ({
EditorModalWrapper: jest.fn(() => (<div>Advanced Editor Iframe</div>)),
}));

describe('AdvancedEditor', () => {
Expand All @@ -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', () => {
Expand Down

0 comments on commit 14f311d

Please sign in to comment.