Skip to content

Commit

Permalink
fixup! Check theme.json validity
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal committed Dec 26, 2023
1 parent 1e13fd3 commit a20a9df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/integration/theme-schema.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ describe( 'theme.json schema', () => {

test.each( jsonFiles )( 'validates schema for `%s`', ( filepath ) => {
// We want to validate the block.json file using the local schema.
const { $schema, ...blockMetadata } = require( filepath );
const { $schema, ...metadata } = require( filepath );

expect( $schema ).toBe( 'https://schemas.wp.org/trunk/theme.json' );

const result = ajv.validate( themeSchema, blockMetadata ) || ajv.errors;
const result = ajv.validate( themeSchema, metadata ) || ajv.errors;

expect( result ).toBe( true );
} );
Expand Down

0 comments on commit a20a9df

Please sign in to comment.