How to use the @wordpress/e2e-tests/fixtures.getBlockFixtureJSON function in @wordpress/e2e-tests

To help you get started, we’ve selected a few @wordpress/e2e-tests examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github WordPress / gutenberg / test / integration / full-content / full-content.spec.js View on Github external
.map( ( basename ) => {
						const {
							filename: htmlFixtureFileName,
						} = getBlockFixtureHTML( basename );
						const {
							file: jsonFixtureContent,
						} = getBlockFixtureJSON( basename );
						// The parser output for this test.  For missing files,
						// JSON.parse( null ) === null.
						const parserOutput = JSON.parse(
							jsonFixtureContent,
						);
						// The name of the first block that this fixture file
						// contains (if any).
						const firstBlock = get( parserOutput, [ '0', 'name' ], null );
						return {
							filename: htmlFixtureFileName,
							parserOutput,
							firstBlock,
						};
					} )
					.filter( ( fixture ) => fixture.parserOutput !== null );