8
0
Просмотр исходного кода

Sixth batch of changes aligning schema use to the new API.

Piotrek Koszuliński 8 лет назад
Родитель
Сommit
5f07c68fa2
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      packages/ckeditor5-link/tests/linkcommand.js

+ 2 - 2
packages/ckeditor5-link/tests/linkcommand.js

@@ -38,7 +38,7 @@ describe( 'LinkCommand', () => {
 			model.schema.register( 'x', { inheritAllFrom: '$block' } );
 
 			model.schema.on( 'checkAttribute', ( evt, args ) => {
-				if ( args[ 0 ].matchEnd( 'x $text' ) && args[ 1 ] == 'linkHref' ) {
+				if ( args[ 0 ].endsWith( 'x $text' ) && args[ 1 ] == 'linkHref' ) {
 					evt.stop();
 					evt.return = false;
 				}
@@ -239,7 +239,7 @@ describe( 'LinkCommand', () => {
 
 			it( 'should not insert text with `linkHref` attribute when is not allowed in parent', () => {
 				model.schema.on( 'checkAttribute', ( evt, args ) => {
-					if ( args[ 0 ].matchEnd( 'p $text' ) && args[ 1 ] == 'linkHref' ) {
+					if ( args[ 0 ].endsWith( 'p $text' ) && args[ 1 ] == 'linkHref' ) {
 						evt.stop();
 						evt.return = false;
 					}