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