Skip to content

Commit

Permalink
fix test case to only ensure that a $schema value exists
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiankaegy committed May 2, 2024
1 parent 4d7547d commit 6062620
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/integration/theme-schema.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,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.
// We want to validate the theme.json file using the local schema.
const { $schema, ...metadata } = require( filepath );

expect( $schema ).toBe( 'https://schemas.wp.org/trunk/theme.json' );
// we expect the $schema property to be present in the theme.json file
expect( $schema ).toBeTruthy();

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

Expand Down

0 comments on commit 6062620

Please sign in to comment.