Răsfoiți Sursa

Merge pull request #13 from ckeditor/t/12

Updated tests with `throwCKEditorError` check.
Piotrek Koszuliński 9 ani în urmă
părinte
comite
967dbd726b

+ 1 - 2
packages/ckeditor5-core/tests/editor/editor-base.js

@@ -8,7 +8,6 @@
 import Editor from '/ckeditor5/core/editor/editor.js';
 import Command from '/ckeditor5/core/command/command.js';
 import Locale from '/ckeditor5/utils/locale.js';
-import CKEditorError from '/ckeditor5/utils/ckeditorerror.js';
 
 describe( 'Editor', () => {
 	describe( 'locale', () => {
@@ -70,7 +69,7 @@ describe( 'Editor', () => {
 
 			expect( () => {
 				editor.execute( 'command' );
-			} ).to.throw( CKEditorError, /^editor-command-not-found:/ );
+			} ).to.throwCKEditorError( /^editor-command-not-found:/ );
 		} );
 	} );
 } );

+ 1 - 1
packages/ckeditor5-core/tests/plugincollection.js

@@ -256,7 +256,7 @@ describe( 'load', () => {
 				throw new Error( 'Test error: this promise should not be resolved successfully' );
 			} )
 			.catch( ( err ) => {
-				expect( err ).to.be.an.instanceof( CKEditorError );
+				expect( CKEditorError.isCKEditorError( err ) ).to.be.true;
 				expect( err.message ).to.match( /^plugincollection-instance/ );
 
 				sinon.assert.calledOnce( logSpy );