diff --git a/packages/block-library/src/cover/test/edit.js b/packages/block-library/src/cover/test/edit.js index d4d3eade2ce46..863a80a833958 100644 --- a/packages/block-library/src/cover/test/edit.js +++ b/packages/block-library/src/cover/test/edit.js @@ -14,7 +14,7 @@ import { async function setup( attributes ) { const testBlock = { name: 'core/cover', attributes }; - return initializeEditor( { testBlocks: testBlock } ); + return initializeEditor( testBlock ); } async function createAndselectBlock() { diff --git a/test/integration/helpers/integration-test-editor.js b/test/integration/helpers/integration-test-editor.js index 93828cb2b305d..b64e092f71d63 100644 --- a/test/integration/helpers/integration-test-editor.js +++ b/test/integration/helpers/integration-test-editor.js @@ -95,11 +95,18 @@ export function Editor( { testBlocks, settings = {} } ) { ); } -export async function initializeEditor( { - useCoreBlocks = true, +/** + * Registers the core block, creates the test block instances, and then instantiates the Editor. + * + * @param {Object | Array} testBlocks Block or array of block settings for blocks to be tested. + * @param {boolean} useCoreBlocks Defaults to true. If false, core blocks will not be registered. + * @param {Object} settings Any additional editor settings to be passed to the editor. + */ +export async function initializeEditor( testBlocks, - ...props -} ) { + useCoreBlocks = true, + settings +) { if ( useCoreBlocks ) { registerCoreBlocks(); } @@ -112,6 +119,8 @@ export async function initializeEditor( { ) ); return waitForStoreResolvers( () => { - return render( ); + return render( + + ); } ); }