diff --git a/blocks/api/factory.js b/blocks/api/factory.js index 000468224adbb..0244967f7bfe5 100644 --- a/blocks/api/factory.js +++ b/blocks/api/factory.js @@ -31,6 +31,7 @@ export function createBlock( name, attributes = {} ) { return { uid: uuid(), name, + isValid: true, attributes: { ...defaultAttributes, ...attributes, diff --git a/blocks/api/test/factory.js b/blocks/api/test/factory.js index 390e3b08f7914..064174fa68751 100644 --- a/blocks/api/test/factory.js +++ b/blocks/api/test/factory.js @@ -36,6 +36,7 @@ describe( 'block factory', () => { includesDefault: true, align: 'left', } ); + expect( block.isValid ).toBe( true ); expect( typeof block.uid ).toBe( 'string' ); } ); } );