8
0
Maciej Bukowski 6 лет назад
Родитель
Сommit
01867bb537
1 измененных файлов с 7 добавлено и 1 удалено
  1. 7 1
      packages/ckeditor5-engine/tests/model/operation/transform.js

+ 7 - 1
packages/ckeditor5-engine/tests/model/operation/transform.js

@@ -3,6 +3,8 @@
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
  */
 
 
+/* globals console */
+
 import { transform, transformSets } from '../../../src/model/operation/transform';
 import { transform, transformSets } from '../../../src/model/operation/transform';
 
 
 import Model from '../../../src/model/model';
 import Model from '../../../src/model/model';
@@ -61,6 +63,8 @@ describe( 'transform', () => {
 	};
 	};
 
 
 	it( 'should throw an error when one of operations is invalid', () => {
 	it( 'should throw an error when one of operations is invalid', () => {
+		const consoleWarnStub = sinon.stub( console, 'warn' );
+
 		const nodeA = new Node();
 		const nodeA = new Node();
 		const nodeB = new Node();
 		const nodeB = new Node();
 
 
@@ -80,7 +84,9 @@ describe( 'transform', () => {
 				abRelation: null,
 				abRelation: null,
 				baRelation: null
 				baRelation: null
 			} );
 			} );
-		} ).to.throw();
+		} ).to.throw( TypeError );
+
+		sinon.assert.calledWith( consoleWarnStub, 'Error during operation transformation!' );
 	} );
 	} );
 
 
 	describe( 'InsertOperation', () => {
 	describe( 'InsertOperation', () => {