Skip to content
This repository was archived by the owner on Oct 4, 2022. It is now read-only.

Commit 5e2faf6

Browse files
committed
Add the blockPresence parameter to the innerBlocksValid test
1 parent 7281eab commit 5e2faf6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/schema-blocks/tests/functions/validators/innerBlocksValid.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import "../../matchMedia.mock";
22
import { BlockInstance } from "@wordpress/blocks";
33
import {
4-
BlockValidationResult,
54
BlockValidation,
5+
BlockValidationResult,
66
RequiredBlock,
77
RequiredBlockOption,
88
RecommendedBlock,
@@ -183,7 +183,7 @@ describe( "The findRedundantBlocks function", () => {
183183
];
184184

185185
// Act.
186-
const result = innerBlocksValid.findRedundantBlocks( existingRequiredBlocks, requiredBlocks );
186+
const result = innerBlocksValid.findRedundantBlocks( existingRequiredBlocks, requiredBlocks, BlockPresence.Required );
187187

188188
// Assert.
189189
expect( result.length ).toEqual( 2 );
@@ -218,7 +218,7 @@ describe( "The findRedundantBlocks function", () => {
218218
];
219219

220220
// Act.
221-
const result: BlockValidationResult[] = innerBlocksValid.findRedundantBlocks( existingBlocks, requiredBlocks );
221+
const result: BlockValidationResult[] = innerBlocksValid.findRedundantBlocks( existingBlocks, requiredBlocks, BlockPresence.Required );
222222

223223
// Assert.
224224
expect( result.length ).toEqual( 0 );

0 commit comments

Comments
 (0)