diff --git a/client/src/entrypoints/contrib/table_block/table.test.js b/client/src/entrypoints/contrib/table_block/table.test.js index 0cfcb4b200..becbf79bb0 100644 --- a/client/src/entrypoints/contrib/table_block/table.test.js +++ b/client/src/entrypoints/contrib/table_block/table.test.js @@ -67,6 +67,7 @@ describe('telepath: wagtail.widgets.TableInput', () => { let testValue; let handsontableConstructorMock; let renderMock; + let updateSettingsMock; // Call this to render the table block with the current settings const render = () => { @@ -84,6 +85,7 @@ describe('telepath: wagtail.widgets.TableInput', () => { beforeEach(() => { handsontableConstructorMock = jest.fn(); renderMock = jest.fn(); + updateSettingsMock = jest.fn(); class HandsontableMock { constructor(...args) { @@ -93,6 +95,10 @@ describe('telepath: wagtail.widgets.TableInput', () => { render() { renderMock(); } + + updateSettings(opts) { + updateSettingsMock(opts); + } } window.Handsontable = HandsontableMock;