diff --git a/src/editors/sharedComponents/InsertLinkModal/index.test.jsx b/src/editors/sharedComponents/InsertLinkModal/index.test.jsx index 2e06e0b87..4fb7261b4 100644 --- a/src/editors/sharedComponents/InsertLinkModal/index.test.jsx +++ b/src/editors/sharedComponents/InsertLinkModal/index.test.jsx @@ -45,6 +45,8 @@ describe('InsertLinkModal', () => { selection: { getContent: () => 'Sample content', setContent: jest.fn(), + getRng: jest.fn(), + getNode: jest.fn(), }, }, }, diff --git a/src/editors/sharedComponents/TinyMceWidget/hooks.test.js b/src/editors/sharedComponents/TinyMceWidget/hooks.test.js index 855c760ea..5dcce107f 100644 --- a/src/editors/sharedComponents/TinyMceWidget/hooks.test.js +++ b/src/editors/sharedComponents/TinyMceWidget/hooks.test.js @@ -164,11 +164,17 @@ describe('TinyMceEditor hooks', () => { onAction: toggleLabelFormatting, }], ])); - expect(addToggleButton.mock.calls).toEqual([ - [tinyMCE.buttons.codeBlock, { - icon: 'sourcecode', tooltip: 'Code Block', onAction: toggleCodeFormatting, onSetup: setupCodeFormatting, - }], - ]); + expect(addToggleButton.mock.calls).toContainEqual( + expect.arrayContaining([ + tinyMCE.buttons.codeBlock, + { + icon: 'sourcecode', + tooltip: 'Code Block', + onAction: toggleCodeFormatting, + onSetup: setupCodeFormatting, + }, + ]), + ); expect(openImgModal).not.toHaveBeenCalled(); expect(editor.on).toHaveBeenCalled(); });