diff --git a/packages/block-library/src/index.native.js b/packages/block-library/src/index.native.js index ea4eda6549b71..0f20f5867f167 100644 --- a/packages/block-library/src/index.native.js +++ b/packages/block-library/src/index.native.js @@ -158,7 +158,7 @@ export const registerCoreBlocks = () => { shortcode, buttons, latestPosts, - devOnly( verse ), + verse, cover, pullquote, ].forEach( registerBlock ); diff --git a/packages/block-library/src/verse/edit.js b/packages/block-library/src/verse/edit.js index 4ca8374fa08d2..25370e634eb75 100644 --- a/packages/block-library/src/verse/edit.js +++ b/packages/block-library/src/verse/edit.js @@ -34,6 +34,7 @@ export default function VerseEdit( { { diff --git a/packages/block-library/src/verse/test/edit.native.js b/packages/block-library/src/verse/test/edit.native.js new file mode 100644 index 0000000000000..e286fd3906a0e --- /dev/null +++ b/packages/block-library/src/verse/test/edit.native.js @@ -0,0 +1,34 @@ +/** + * External dependencies + */ +import renderer from 'react-test-renderer'; + +/** + * Internal dependencies + */ +import Verse from '../edit'; + +/** + * WordPress dependencies + */ +import { RichText } from '@wordpress/block-editor'; + +describe( 'Verse Block', () => { + it( 'renders without crashing', () => { + const component = renderer.create( + + ); + const rendered = component.toJSON(); + expect( rendered ).toBeTruthy(); + } ); + + it( 'renders given text without crashing', () => { + const component = renderer.create( + + ); + const testInstance = component.root; + const richText = testInstance.findByType( RichText ); + expect( richText ).toBeTruthy(); + expect( richText.props.value ).toBe( 'sample text' ); + } ); +} );