Maciej Bukowski il y a 6 ans
Parent
commit
d89a4ca218
1 fichiers modifiés avec 3 ajouts et 4 suppressions
  1. 3 4
      packages/ckeditor5-utils/tests/emittermixin.js

+ 3 - 4
packages/ckeditor5-utils/tests/emittermixin.js

@@ -166,17 +166,16 @@ describe( 'EmitterMixin', () => {
 			}, /Foo/, null );
 		} );
 
-		it( 'should wrap an error into the CKEditorError if a native error was thrown', () => {
+		it( 'should rethrow the native errors as they are in the dubug=true mode', () => {
 			const error = new TypeError( 'foo' );
-			error.stack = 'bar';
 
 			emitter.on( 'test', () => {
 				throw error;
 			} );
 
-			expectToThrowCKEditorError( () => {
+			expect( () => {
 				emitter.fire( 'test' );
-			}, /foo/ );
+			} ).to.throw( TypeError, /foo/ );
 		} );
 
 		describe( 'return value', () => {