Explorar el Código

WIP - changing errors.

Maciej Bukowski hace 6 años
padre
commit
19676e807f

+ 4 - 3
packages/ckeditor5-mention/tests/mentioncommand.js

@@ -7,7 +7,8 @@ import ModelTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/modeltestedit
 import { setData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
 
 import MentionCommand from '../src/mentioncommand';
-import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
+
+import { expectToThrowCKEditorError } from '@ckeditor/ckeditor5-utils/tests/_utils/utils';
 
 describe( 'MentionCommand', () => {
 	let editor, command, model, doc, selection;
@@ -145,7 +146,7 @@ describe( 'MentionCommand', () => {
 			];
 
 			for ( const options of testCases ) {
-				expect( () => command.execute( options ) ).to.throw( CKEditorError, /mentioncommand-incorrect-marker/ );
+				expectToThrowCKEditorError( () => command.execute( options ), /mentioncommand-incorrect-marker/, editor );
 			}
 		} );
 
@@ -159,7 +160,7 @@ describe( 'MentionCommand', () => {
 			];
 
 			for ( const options of testCases ) {
-				expect( () => command.execute( options ) ).to.throw( CKEditorError, /mentioncommand-incorrect-id/ );
+				expectToThrowCKEditorError( () => command.execute( options ), /mentioncommand-incorrect-id/, editor );
 			}
 		} );
 	} );

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 888 - 699
packages/ckeditor5-mention/tests/mentionui.js


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio