diff --git a/tests/attributecommand.js b/tests/attributecommand.js index 37fae23..eae332e 100644 --- a/tests/attributecommand.js +++ b/tests/attributecommand.js @@ -33,16 +33,12 @@ describe( 'AttributeCommand', () => { isObject: true } ); - model.schema.on( 'checkAttribute', ( evt, args ) => { - const ctx = args[ 0 ]; - const attributeName = args[ 1 ]; - + model.schema.addAttributeCheck( ( ctx, attributeName ) => { // Allow 'bold' on p>$text. if ( ctx.endsWith( 'p $text' ) && attributeName == 'bold' ) { - evt.stop(); - evt.return = true; + return true; } - }, { priority: 'high' } ); + } ); } ); } );