Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Fixed transformation test.
Browse files Browse the repository at this point in the history
  • Loading branch information
ma2ciek committed Sep 19, 2019
1 parent ac89311 commit 4734f18
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/model/operation/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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();

Expand All @@ -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', () => {
Expand Down

0 comments on commit 4734f18

Please sign in to comment.