Browse Source

Changed .to(.be).equal(s) to .to.equal.

Szymon Cofalik 10 years ago
parent
commit
bb2cb8980e

+ 3 - 3
packages/ckeditor5-utils/tests/document/attribute.js

@@ -41,7 +41,7 @@ describe( 'Attribute', function() {
 			var attr1 = new Attribute( 'register', true );
 			var attr2 = new Attribute( 'register', true );
 
-			expect( attr1 ).to.equals( attr2 );
+			expect( attr1 ).to.equal( attr2 );
 			expect( attr1.isEqual( attr2 ) ).to.be.true;
 		} );
 
@@ -74,8 +74,8 @@ describe( 'Attribute', function() {
 			var attr4 = new Attribute( 'register', true );
 
 			expect( attr1 ).to.not.be.equals( attr2 );
-			expect( attr2 ).to.equals( attr3 );
-			expect( attr3 ).to.equals( attr4 );
+			expect( attr2 ).to.equal( attr3 );
+			expect( attr3 ).to.equal( attr4 );
 		} );
 	} );
 } );

+ 36 - 36
packages/ckeditor5-utils/tests/document/changeoperation.js

@@ -51,11 +51,11 @@ describe( 'ChangeOperation', function() {
 			newAttr,
 			doc.version ) );
 
-		expect( doc.version ).to.be.equal( 1 );
-		expect( root.getChildCount() ).to.be.equal( 3 );
+		expect( doc.version ).to.equal( 1 );
+		expect( root.getChildCount() ).to.equal( 3 );
 		expect( root.getChild( 0 ).hasAttr( newAttr ) ).to.be.true;
 		expect( root.getChild( 1 ).hasAttr( newAttr ) ).to.be.true;
-		expect( root.getChild( 2 )._getAttrCount() ).to.be.equal( 0 );
+		expect( root.getChild( 2 )._getAttrCount() ).to.equal( 0 );
 	} );
 
 	it( 'should add attribute to the existing attributes', function() {
@@ -71,9 +71,9 @@ describe( 'ChangeOperation', function() {
 			newAttr,
 			doc.version ) );
 
-		expect( doc.version ).to.be.equal( 1 );
-		expect( root.getChildCount() ).to.be.equal( 1 );
-		expect( root.getChild( 0 )._getAttrCount() ).to.be.equal( 3 );
+		expect( doc.version ).to.equal( 1 );
+		expect( root.getChildCount() ).to.equal( 1 );
+		expect( root.getChild( 0 )._getAttrCount() ).to.equal( 3 );
 		expect( root.getChild( 0 ).hasAttr( newAttr ) ).to.be.true;
 		expect( root.getChild( 0 ).hasAttr( fooAttr ) ).to.be.true;
 		expect( root.getChild( 0 ).hasAttr( barAttr ) ).to.be.true;
@@ -91,13 +91,13 @@ describe( 'ChangeOperation', function() {
 			newAttr,
 			doc.version ) );
 
-		expect( doc.version ).to.be.equal( 1 );
-		expect( root.getChildCount() ).to.be.equal( 3 );
-		expect( root.getChild( 0 )._getAttrCount() ).to.be.equal( 1 );
+		expect( doc.version ).to.equal( 1 );
+		expect( root.getChildCount() ).to.equal( 3 );
+		expect( root.getChild( 0 )._getAttrCount() ).to.equal( 1 );
 		expect( root.getChild( 0 ).hasAttr( newAttr ) ).to.be.true;
-		expect( root.getChild( 1 )._getAttrCount() ).to.be.equal( 1 );
+		expect( root.getChild( 1 )._getAttrCount() ).to.equal( 1 );
 		expect( root.getChild( 1 ).hasAttr( newAttr ) ).to.be.true;
-		expect( root.getChild( 2 )._getAttrCount() ).to.be.equal( 1 );
+		expect( root.getChild( 2 )._getAttrCount() ).to.equal( 1 );
 		expect( root.getChild( 2 ).hasAttr( oldAttr ) ).to.be.true;
 	} );
 
@@ -115,9 +115,9 @@ describe( 'ChangeOperation', function() {
 			x2Attr,
 			doc.version ) );
 
-		expect( doc.version ).to.be.equal( 1 );
-		expect( root.getChildCount() ).to.be.equal( 1 );
-		expect( root.getChild( 0 )._getAttrCount() ).to.be.equal( 3 );
+		expect( doc.version ).to.equal( 1 );
+		expect( root.getChildCount() ).to.equal( 1 );
+		expect( root.getChild( 0 )._getAttrCount() ).to.equal( 3 );
 		expect( root.getChild( 0 ).hasAttr( fooAttr ) ).to.be.true;
 		expect( root.getChild( 0 ).hasAttr( x2Attr ) ).to.be.true;
 		expect( root.getChild( 0 ).hasAttr( barAttr ) ).to.be.true;
@@ -136,9 +136,9 @@ describe( 'ChangeOperation', function() {
 			null,
 			doc.version ) );
 
-		expect( doc.version ).to.be.equal( 1 );
-		expect( root.getChildCount() ).to.be.equal( 1 );
-		expect( root.getChild( 0 )._getAttrCount() ).to.be.equal( 2 );
+		expect( doc.version ).to.equal( 1 );
+		expect( root.getChildCount() ).to.equal( 1 );
+		expect( root.getChild( 0 )._getAttrCount() ).to.equal( 2 );
 		expect( root.getChild( 0 ).hasAttr( fooAttr ) ).to.be.true;
 		expect( root.getChild( 0 ).hasAttr( barAttr ) ).to.be.true;
 	} );
@@ -154,10 +154,10 @@ describe( 'ChangeOperation', function() {
 		var reverse = operation.reverseOperation();
 
 		expect( reverse ).to.be.an.instanceof( ChangeOperation );
-		expect( reverse.baseVersion ).to.equals( 1 );
-		expect( reverse.range ).to.equals( range );
-		expect( reverse.oldAttr ).to.equals( newAttr );
-		expect( reverse.newAttr ).to.equals( oldAttr );
+		expect( reverse.baseVersion ).to.equal( 1 );
+		expect( reverse.range ).to.equal( range );
+		expect( reverse.oldAttr ).to.equal( newAttr );
+		expect( reverse.newAttr ).to.equal( oldAttr );
 	} );
 
 	it( 'should undo adding attribute by applying reverse operation', function() {
@@ -176,11 +176,11 @@ describe( 'ChangeOperation', function() {
 		doc.applyOperation( operation );
 		doc.applyOperation( reverse );
 
-		expect( doc.version ).to.be.equal( 2 );
-		expect( root.getChildCount() ).to.be.equal( 3 );
-		expect( root.getChild( 0 )._getAttrCount() ).to.be.equal( 0 );
-		expect( root.getChild( 1 )._getAttrCount() ).to.be.equal( 0 );
-		expect( root.getChild( 2 )._getAttrCount() ).to.be.equal( 0 );
+		expect( doc.version ).to.equal( 2 );
+		expect( root.getChildCount() ).to.equal( 3 );
+		expect( root.getChild( 0 )._getAttrCount() ).to.equal( 0 );
+		expect( root.getChild( 1 )._getAttrCount() ).to.equal( 0 );
+		expect( root.getChild( 2 )._getAttrCount() ).to.equal( 0 );
 	} );
 
 	it( 'should undo changing attribute by applying reverse operation', function() {
@@ -201,13 +201,13 @@ describe( 'ChangeOperation', function() {
 
 		doc.applyOperation( reverse );
 
-		expect( doc.version ).to.be.equal( 2 );
-		expect( root.getChildCount() ).to.be.equal( 3 );
-		expect( root.getChild( 0 )._getAttrCount() ).to.be.equal( 1 );
+		expect( doc.version ).to.equal( 2 );
+		expect( root.getChildCount() ).to.equal( 3 );
+		expect( root.getChild( 0 )._getAttrCount() ).to.equal( 1 );
 		expect( root.getChild( 0 ).hasAttr( oldAttr ) ).to.be.true;
-		expect( root.getChild( 1 )._getAttrCount() ).to.be.equal( 1 );
+		expect( root.getChild( 1 )._getAttrCount() ).to.equal( 1 );
 		expect( root.getChild( 1 ).hasAttr( oldAttr ) ).to.be.true;
-		expect( root.getChild( 2 )._getAttrCount() ).to.be.equal( 1 );
+		expect( root.getChild( 2 )._getAttrCount() ).to.equal( 1 );
 		expect( root.getChild( 2 ).hasAttr( oldAttr ) ).to.be.true;
 	} );
 
@@ -228,13 +228,13 @@ describe( 'ChangeOperation', function() {
 
 		doc.applyOperation( reverse );
 
-		expect( doc.version ).to.be.equal( 2 );
-		expect( root.getChildCount() ).to.be.equal( 3 );
-		expect( root.getChild( 0 )._getAttrCount() ).to.be.equal( 1 );
+		expect( doc.version ).to.equal( 2 );
+		expect( root.getChildCount() ).to.equal( 3 );
+		expect( root.getChild( 0 )._getAttrCount() ).to.equal( 1 );
 		expect( root.getChild( 0 ).hasAttr( fooAttr ) ).to.be.true;
-		expect( root.getChild( 1 )._getAttrCount() ).to.be.equal( 1 );
+		expect( root.getChild( 1 )._getAttrCount() ).to.equal( 1 );
 		expect( root.getChild( 1 ).hasAttr( fooAttr ) ).to.be.true;
-		expect( root.getChild( 2 )._getAttrCount() ).to.be.equal( 1 );
+		expect( root.getChild( 2 )._getAttrCount() ).to.equal( 1 );
 		expect( root.getChild( 2 ).hasAttr( fooAttr ) ).to.be.true;
 	} );
 

+ 3 - 3
packages/ckeditor5-utils/tests/document/character.js

@@ -33,7 +33,7 @@ describe( 'Character', function() {
 			expect( character ).to.be.an.instanceof( Node );
 			expect( character ).to.have.property( 'character' ).that.equals( 'f' );
 			expect( character ).to.have.property( 'parent' ).that.equals( parent );
-			expect( character._getAttrCount() ).to.equals( 0 );
+			expect( character._getAttrCount() ).to.equal( 0 );
 		} );
 
 		it( 'should create character with attributes', function() {
@@ -44,8 +44,8 @@ describe( 'Character', function() {
 			expect( character ).to.be.an.instanceof( Node );
 			expect( character ).to.have.property( 'character' ).that.equals( 'f' );
 			expect( character ).to.have.property( 'parent' ).that.equals( parent );
-			expect( character._getAttrCount() ).to.equals( 1 );
-			expect( character.getAttr( attr.key ) ).to.equals( attr.value );
+			expect( character._getAttrCount() ).to.equal( 1 );
+			expect( character.getAttr( attr.key ) ).to.equal( attr.value );
 		} );
 	} );
 } );

+ 6 - 6
packages/ckeditor5-utils/tests/document/document.js

@@ -27,9 +27,9 @@ describe( 'Document', function() {
 	describe( 'constructor', function() {
 		it( 'should create Document with no data', function() {
 			expect( document ).to.have.property( 'roots' ).that.is.instanceof( Map );
-			expect( document.roots.size ).to.be.equal( 1 );
+			expect( document.roots.size ).to.equal( 1 );
 			expect( document._graveyard ).to.be.instanceof( RootElement );
-			expect( document._graveyard.getChildCount() ).to.be.equal( 0 );
+			expect( document._graveyard.getChildCount() ).to.equal( 0 );
 		} );
 	} );
 
@@ -37,9 +37,9 @@ describe( 'Document', function() {
 		it( 'should create a new RootElement, add it to roots map and return it', function() {
 			var root = document.createRoot( 'root' );
 
-			expect( document.roots.size ).to.be.equal( 2 );
+			expect( document.roots.size ).to.equal( 2 );
 			expect( root ).to.be.instanceof( RootElement );
-			expect( root.getChildCount() ).to.be.equal( 0 );
+			expect( root.getChildCount() ).to.equal( 0 );
 		} );
 
 		it( 'should throw an error when trying to create a second root with the same name', function() {
@@ -56,7 +56,7 @@ describe( 'Document', function() {
 			var newRoot = document.createRoot( 'root' );
 			var getRoot = document.getRoot( 'root' );
 
-			expect( getRoot ).to.be.equal( newRoot );
+			expect( getRoot ).to.equal( newRoot );
 		} );
 
 		it( 'should throw an error when trying to get non-existent root', function() {
@@ -78,7 +78,7 @@ describe( 'Document', function() {
 
 			document.applyOperation( operation );
 
-			expect( document.version ).to.be.equal( 1 );
+			expect( document.version ).to.equal( 1 );
 			sinon.assert.calledOnce( operationApplied );
 			sinon.assert.calledOnce( operation._execute );
 		} );

+ 10 - 10
packages/ckeditor5-utils/tests/document/element.js

@@ -33,7 +33,7 @@ describe( 'Element', function() {
 			expect( element ).to.be.an.instanceof( Node );
 			expect( element ).to.have.property( 'name' ).that.equals( 'elem' );
 			expect( element ).to.have.property( 'parent' ).that.equals( parent );
-			expect( element._getAttrCount() ).to.equals( 0 );
+			expect( element._getAttrCount() ).to.equal( 0 );
 		} );
 
 		it( 'should create element with attributes', function() {
@@ -45,15 +45,15 @@ describe( 'Element', function() {
 			expect( element ).to.be.an.instanceof( Node );
 			expect( element ).to.have.property( 'name' ).that.equals( 'elem' );
 			expect( element ).to.have.property( 'parent' ).that.equals( parent );
-			expect( element._getAttrCount() ).to.equals( 1 );
-			expect( element.getAttr( attr.key ) ).to.equals( attr.value );
+			expect( element._getAttrCount() ).to.equal( 1 );
+			expect( element.getAttr( attr.key ) ).to.equal( attr.value );
 		} );
 
 		it( 'should create element with children', function() {
 			var element = new Element( 'elem', [], 'foo' );
 
 			expect( element ).to.have.property( 'name' ).that.equals( 'elem' );
-			expect( element.getChildCount() ).to.equals( 3 );
+			expect( element.getChildCount() ).to.equal( 3 );
 			expect( element.getChild( 0 ) ).to.have.property( 'character' ).that.equals( 'f' );
 			expect( element.getChild( 1 ) ).to.have.property( 'character' ).that.equals( 'o' );
 			expect( element.getChild( 2 ) ).to.have.property( 'character' ).that.equals( 'o' );
@@ -66,7 +66,7 @@ describe( 'Element', function() {
 			element.insertChildren( 1, 'foo' );
 
 			expect( element ).to.have.property( 'name' ).that.equals( 'elem' );
-			expect( element.getChildCount() ).to.equals( 5 );
+			expect( element.getChildCount() ).to.equal( 5 );
 			expect( element.getChild( 0 ) ).to.have.property( 'character' ).that.equals( 'x' );
 			expect( element.getChild( 1 ) ).to.have.property( 'character' ).that.equals( 'f' );
 			expect( element.getChild( 2 ) ).to.have.property( 'character' ).that.equals( 'o' );
@@ -83,7 +83,7 @@ describe( 'Element', function() {
 			var a = element.getChild( 4 );
 			var removed = element.removeChildren( 2, 3 );
 
-			expect( element.getChildCount() ).to.equals( 3 );
+			expect( element.getChildCount() ).to.equal( 3 );
 			expect( element.getChild( 0 ) ).to.have.property( 'character' ).that.equals( 'f' );
 			expect( element.getChild( 1 ) ).to.have.property( 'character' ).that.equals( 'o' );
 			expect( element.getChild( 2 ) ).to.have.property( 'character' ).that.equals( 'r' );
@@ -107,9 +107,9 @@ describe( 'Element', function() {
 			var a = element.getChild( 1 );
 			var r = element.getChild( 2 );
 
-			expect( element.getChildIndex( b ) ).to.equals( 0 );
-			expect( element.getChildIndex( a ) ).to.equals( 1 );
-			expect( element.getChildIndex( r ) ).to.equals( 2 );
+			expect( element.getChildIndex( b ) ).to.equal( 0 );
+			expect( element.getChildIndex( a ) ).to.equal( 1 );
+			expect( element.getChildIndex( r ) ).to.equal( 2 );
 		} );
 	} );
 
@@ -117,7 +117,7 @@ describe( 'Element', function() {
 		it( 'should return number of children', function() {
 			var element = new Element( 'elem', [], [ 'bar' ] );
 
-			expect( element.getChildCount() ).to.equals( 3 );
+			expect( element.getChildCount() ).to.equal( 3 );
 		} );
 	} );
 } );

+ 30 - 30
packages/ckeditor5-utils/tests/document/insertoperation.js

@@ -39,19 +39,19 @@ describe( 'InsertOperation', function() {
 			new Character( 'x' ),
 			doc.version ) );
 
-		expect( doc.version ).to.be.equal( 1 );
-		expect( root.getChildCount() ).to.be.equal( 1 );
-		expect( root.getChild( 0 ).character ).to.be.equal( 'x' );
+		expect( doc.version ).to.equal( 1 );
+		expect( root.getChildCount() ).to.equal( 1 );
+		expect( root.getChild( 0 ).character ).to.equal( 'x' );
 	} );
 
 	it( 'should insert set of nodes', function() {
 		doc.applyOperation( new InsertOperation( new Position( [ 0 ], root ), 'bar', doc.version ) );
 
-		expect( doc.version ).to.be.equal( 1 );
-		expect( root.getChildCount() ).to.be.equal( 3 );
-		expect( root.getChild( 0 ).character ).to.be.equal( 'b' );
-		expect( root.getChild( 1 ).character ).to.be.equal( 'a' );
-		expect( root.getChild( 2 ).character ).to.be.equal( 'r' );
+		expect( doc.version ).to.equal( 1 );
+		expect( root.getChildCount() ).to.equal( 3 );
+		expect( root.getChild( 0 ).character ).to.equal( 'b' );
+		expect( root.getChild( 1 ).character ).to.equal( 'a' );
+		expect( root.getChild( 2 ).character ).to.equal( 'r' );
 	} );
 
 	it( 'should insert between existing nodes', function() {
@@ -59,13 +59,13 @@ describe( 'InsertOperation', function() {
 
 		doc.applyOperation( new InsertOperation( new Position( [ 1 ], root ), 'bar', doc.version ) );
 
-		expect( doc.version ).to.be.equal( 1 );
-		expect( root.getChildCount() ).to.be.equal( 5 );
-		expect( root.getChild( 0 ).character ).to.be.equal( 'x' );
-		expect( root.getChild( 1 ).character ).to.be.equal( 'b' );
-		expect( root.getChild( 2 ).character ).to.be.equal( 'a' );
-		expect( root.getChild( 3 ).character ).to.be.equal( 'r' );
-		expect( root.getChild( 4 ).character ).to.be.equal( 'y' );
+		expect( doc.version ).to.equal( 1 );
+		expect( root.getChildCount() ).to.equal( 5 );
+		expect( root.getChild( 0 ).character ).to.equal( 'x' );
+		expect( root.getChild( 1 ).character ).to.equal( 'b' );
+		expect( root.getChild( 2 ).character ).to.equal( 'a' );
+		expect( root.getChild( 3 ).character ).to.equal( 'r' );
+		expect( root.getChild( 4 ).character ).to.equal( 'y' );
 	} );
 
 	it( 'should insert text', function() {
@@ -74,15 +74,15 @@ describe( 'InsertOperation', function() {
 			[ 'foo', new Character( 'x' ), 'bar' ],
 			doc.version ) );
 
-		expect( doc.version ).to.be.equal( 1 );
-		expect( root.getChildCount() ).to.be.equal( 7 );
-		expect( root.getChild( 0 ).character ).to.be.equal( 'f' );
-		expect( root.getChild( 1 ).character ).to.be.equal( 'o' );
-		expect( root.getChild( 2 ).character ).to.be.equal( 'o' );
-		expect( root.getChild( 3 ).character ).to.be.equal( 'x' );
-		expect( root.getChild( 4 ).character ).to.be.equal( 'b' );
-		expect( root.getChild( 5 ).character ).to.be.equal( 'a' );
-		expect( root.getChild( 6 ).character ).to.be.equal( 'r' );
+		expect( doc.version ).to.equal( 1 );
+		expect( root.getChildCount() ).to.equal( 7 );
+		expect( root.getChild( 0 ).character ).to.equal( 'f' );
+		expect( root.getChild( 1 ).character ).to.equal( 'o' );
+		expect( root.getChild( 2 ).character ).to.equal( 'o' );
+		expect( root.getChild( 3 ).character ).to.equal( 'x' );
+		expect( root.getChild( 4 ).character ).to.equal( 'b' );
+		expect( root.getChild( 5 ).character ).to.equal( 'a' );
+		expect( root.getChild( 6 ).character ).to.equal( 'r' );
 	} );
 
 	it( 'should create a remove operation as a reverse', function() {
@@ -107,12 +107,12 @@ describe( 'InsertOperation', function() {
 
 		doc.applyOperation( operation );
 
-		expect( doc.version ).to.be.equal( 1 );
+		expect( doc.version ).to.equal( 1 );
 
 		doc.applyOperation( reverse );
 
-		expect( doc.version ).to.be.equal( 2 );
-		expect( root.getChildCount() ).to.be.equal( 0 );
+		expect( doc.version ).to.equal( 2 );
+		expect( root.getChildCount() ).to.equal( 0 );
 	} );
 
 	it( 'should undo insert set of nodes by applying reverse operation', function() {
@@ -122,11 +122,11 @@ describe( 'InsertOperation', function() {
 
 		doc.applyOperation( operation );
 
-		expect( doc.version ).to.be.equal( 1 );
+		expect( doc.version ).to.equal( 1 );
 
 		doc.applyOperation( reverse );
 
-		expect( doc.version ).to.be.equal( 2 );
-		expect( root.getChildCount() ).to.be.equal( 0 );
+		expect( doc.version ).to.equal( 2 );
+		expect( root.getChildCount() ).to.equal( 0 );
 	} );
 } );

+ 13 - 13
packages/ckeditor5-utils/tests/document/node.js

@@ -113,8 +113,8 @@ describe( 'constructor', function() {
 
 		foo.removeAttr( 'attr' );
 
-		expect( foo._getAttrCount() ).to.equals( 0 );
-		expect( bar._getAttrCount() ).to.equals( 1 );
+		expect( foo._getAttrCount() ).to.equal( 0 );
+		expect( bar._getAttrCount() ).to.equal( 1 );
 	} );
 } );
 
@@ -126,7 +126,7 @@ describe( 'getAttr', function() {
 		var fooAttr = new Attribute( 'foo', true );
 		var element = new Element( 'foo', [ fooAttr ] );
 
-		expect( element.getAttr( 'foo' ) ).to.equals( fooAttr.value );
+		expect( element.getAttr( 'foo' ) ).to.equal( fooAttr.value );
 	} );
 
 	it( 'should return null if attribute was not found by key', function() {
@@ -149,8 +149,8 @@ describe( 'setAttr', function() {
 		var attr = new Attribute( 'foo', 'bar' );
 		element.setAttr( attr );
 
-		expect( element._getAttrCount() ).to.equals( 1 );
-		expect( element.getAttr( attr.key ) ).to.equals( attr.value );
+		expect( element._getAttrCount() ).to.equal( 1 );
+		expect( element.getAttr( attr.key ) ).to.equal( attr.value );
 	} );
 
 	it( 'should overwrite attribute with the same key', function() {
@@ -163,8 +163,8 @@ describe( 'setAttr', function() {
 
 		element.setAttr( newAttr );
 
-		expect( element._getAttrCount() ).to.equals( 1 );
-		expect( element.getAttr( newAttr.key ) ).to.equals( newAttr.value );
+		expect( element._getAttrCount() ).to.equal( 1 );
+		expect( element.getAttr( newAttr.key ) ).to.equal( newAttr.value );
 	} );
 } );
 
@@ -179,9 +179,9 @@ describe( 'removeAttr', function() {
 		var element = new Element( 'elem', [ attrA, attrB, attrC ] );
 		element.removeAttr( attrB.key );
 
-		expect( element._getAttrCount() ).to.equals( 2 );
-		expect( element.getAttr( attrA.key ) ).to.equals( attrA.value );
-		expect( element.getAttr( attrC.key ) ).to.equals( attrC.value );
+		expect( element._getAttrCount() ).to.equal( 2 );
+		expect( element.getAttr( attrA.key ) ).to.equal( attrA.value );
+		expect( element.getAttr( attrC.key ) ).to.equal( attrC.value );
 		expect( element.getAttr( attrB.key ) ).to.be.null;
 	} );
 } );
@@ -238,7 +238,7 @@ describe( 'hasAttr', function() {
 		var parsedFoo = JSON.parse( JSON.stringify( foo ) );
 		var parsedBar = JSON.parse( JSON.stringify( b ) );
 
-		expect( parsedFoo.parent ).to.equals( null );
-		expect( parsedBar.parent ).to.equals( 'foo' );
+		expect( parsedFoo.parent ).to.equal( null );
+		expect( parsedBar.parent ).to.equal( 'foo' );
 	} );
-} );
+} );

+ 35 - 35
packages/ckeditor5-utils/tests/document/nodelist.js

@@ -20,14 +20,14 @@ describe( 'constructor', function() {
 
 		var nodeList = new NodeList( [ 'foo', new Character( 'x' ), 'bar' ] );
 
-		expect( nodeList.length ).to.be.equal( 7 );
-		expect( nodeList.get( 0 ).character ).to.be.equal( 'f' );
-		expect( nodeList.get( 1 ).character ).to.be.equal( 'o' );
-		expect( nodeList.get( 2 ).character ).to.be.equal( 'o' );
-		expect( nodeList.get( 3 ).character ).to.be.equal( 'x' );
-		expect( nodeList.get( 4 ).character ).to.be.equal( 'b' );
-		expect( nodeList.get( 5 ).character ).to.be.equal( 'a' );
-		expect( nodeList.get( 6 ).character ).to.be.equal( 'r' );
+		expect( nodeList.length ).to.equal( 7 );
+		expect( nodeList.get( 0 ).character ).to.equal( 'f' );
+		expect( nodeList.get( 1 ).character ).to.equal( 'o' );
+		expect( nodeList.get( 2 ).character ).to.equal( 'o' );
+		expect( nodeList.get( 3 ).character ).to.equal( 'x' );
+		expect( nodeList.get( 4 ).character ).to.equal( 'b' );
+		expect( nodeList.get( 5 ).character ).to.equal( 'a' );
+		expect( nodeList.get( 6 ).character ).to.equal( 'r' );
 	} );
 
 	it( 'should change string into a set of nodes', function() {
@@ -35,10 +35,10 @@ describe( 'constructor', function() {
 
 		var nodeList = new NodeList( 'foo' );
 
-		expect( nodeList.length ).to.be.equal( 3 );
-		expect( nodeList.get( 0 ).character ).to.be.equal( 'f' );
-		expect( nodeList.get( 1 ).character ).to.be.equal( 'o' );
-		expect( nodeList.get( 2 ).character ).to.be.equal( 'o' );
+		expect( nodeList.length ).to.equal( 3 );
+		expect( nodeList.get( 0 ).character ).to.equal( 'f' );
+		expect( nodeList.get( 1 ).character ).to.equal( 'o' );
+		expect( nodeList.get( 2 ).character ).to.equal( 'o' );
 	} );
 
 	it( 'should change node into a set of nodes', function() {
@@ -47,8 +47,8 @@ describe( 'constructor', function() {
 
 		var nodeList = new NodeList( new Character( 'x' ) );
 
-		expect( nodeList.length ).to.be.equal( 1 );
-		expect( nodeList.get( 0 ).character ).to.be.equal( 'x' );
+		expect( nodeList.length ).to.equal( 1 );
+		expect( nodeList.get( 0 ).character ).to.equal( 'x' );
 	} );
 
 	it( 'should change text with attribute into a set of nodes', function() {
@@ -60,13 +60,13 @@ describe( 'constructor', function() {
 
 		var nodeList = new NodeList( new Text( 'foo', [ attr ] ) );
 
-		expect( nodeList.length ).to.be.equal( 3 );
-		expect( nodeList.get( 0 ).character ).to.be.equal( 'f' );
-		expect( nodeList.get( 0 ).getAttr( attr.key ) ).to.be.equal( attr.value );
-		expect( nodeList.get( 1 ).character ).to.be.equal( 'o' );
-		expect( nodeList.get( 1 ).getAttr( attr.key ) ).to.be.equal( attr.value );
-		expect( nodeList.get( 2 ).character ).to.be.equal( 'o' );
-		expect( nodeList.get( 2 ).getAttr( attr.key ) ).to.be.equal( attr.value );
+		expect( nodeList.length ).to.equal( 3 );
+		expect( nodeList.get( 0 ).character ).to.equal( 'f' );
+		expect( nodeList.get( 0 ).getAttr( attr.key ) ).to.equal( attr.value );
+		expect( nodeList.get( 1 ).character ).to.equal( 'o' );
+		expect( nodeList.get( 1 ).getAttr( attr.key ) ).to.equal( attr.value );
+		expect( nodeList.get( 2 ).character ).to.equal( 'o' );
+		expect( nodeList.get( 2 ).getAttr( attr.key ) ).to.equal( attr.value );
 	} );
 } );
 
@@ -79,13 +79,13 @@ describe( 'insert', function() {
 
 		outerList.insert( 2, innerList );
 
-		expect( outerList.length ).to.be.equal( 6 );
-		expect( outerList.get( 0 ).character ).to.be.equal( 'f' );
-		expect( outerList.get( 1 ).character ).to.be.equal( 'o' );
-		expect( outerList.get( 2 ).character ).to.be.equal( 'x' );
-		expect( outerList.get( 3 ).character ).to.be.equal( 'x' );
-		expect( outerList.get( 4 ).character ).to.be.equal( 'x' );
-		expect( outerList.get( 5 ).character ).to.be.equal( 'o' );
+		expect( outerList.length ).to.equal( 6 );
+		expect( outerList.get( 0 ).character ).to.equal( 'f' );
+		expect( outerList.get( 1 ).character ).to.equal( 'o' );
+		expect( outerList.get( 2 ).character ).to.equal( 'x' );
+		expect( outerList.get( 3 ).character ).to.equal( 'x' );
+		expect( outerList.get( 4 ).character ).to.equal( 'x' );
+		expect( outerList.get( 5 ).character ).to.equal( 'o' );
 	} );
 } );
 
@@ -97,10 +97,10 @@ describe( 'remove', function() {
 
 		nodeList.remove( 2, 3 );
 
-		expect( nodeList.length ).to.be.equal( 3 );
-		expect( nodeList.get( 0 ).character ).to.be.equal( 'f' );
-		expect( nodeList.get( 1 ).character ).to.be.equal( 'o' );
-		expect( nodeList.get( 2 ).character ).to.be.equal( 'r' );
+		expect( nodeList.length ).to.equal( 3 );
+		expect( nodeList.get( 0 ).character ).to.equal( 'f' );
+		expect( nodeList.get( 1 ).character ).to.equal( 'o' );
+		expect( nodeList.get( 2 ).character ).to.equal( 'r' );
 	} );
 } );
 
@@ -113,10 +113,10 @@ describe( 'iterator', function() {
 		var i = 0;
 
 		for ( var node of nodeList ) {
-			expect( node.character ).to.be.equal( characters[ i ] );
+			expect( node.character ).to.equal( characters[ i ] );
 			i++;
 		}
 
-		expect( i ).to.be.equal( 3 );
+		expect( i ).to.equal( 3 );
 	} );
-} );
+} );

+ 19 - 19
packages/ckeditor5-utils/tests/document/removeoperation.js

@@ -31,8 +31,8 @@ describe( 'RemoveOperation', function() {
 			doc.root.getChild( 0 ),
 			doc.version ) );
 
-		expect( doc.version ).to.be.equal( 1 );
-		expect( doc.root.getChildCount() ).to.be.equal( 0 );
+		expect( doc.version ).to.equal( 1 );
+		expect( doc.root.getChildCount() ).to.equal( 0 );
 	} );
 
 	it( 'should remove set of nodes', function() {
@@ -49,8 +49,8 @@ describe( 'RemoveOperation', function() {
 			[ doc.root.getChild( 0 ), doc.root.getChild( 1 ), doc.root.getChild( 2 ) ],
 			doc.version ) );
 
-		expect( doc.version ).to.be.equal( 1 );
-		expect( doc.root.getChildCount() ).to.be.equal( 0 );
+		expect( doc.version ).to.equal( 1 );
+		expect( doc.root.getChildCount() ).to.equal( 0 );
 	} );
 
 	it( 'should remove from between existing nodes', function() {
@@ -67,10 +67,10 @@ describe( 'RemoveOperation', function() {
 			[ doc.root.getChild( 1 ) ],
 			doc.version ) );
 
-		expect( doc.version ).to.be.equal( 1 );
-		expect( doc.root.getChildCount() ).to.be.equal( 2 );
-		expect( doc.root.getChild( 0 ).character ).to.be.equal( 'b' );
-		expect( doc.root.getChild( 1 ).character ).to.be.equal( 'r' );
+		expect( doc.version ).to.equal( 1 );
+		expect( doc.root.getChildCount() ).to.equal( 2 );
+		expect( doc.root.getChild( 0 ).character ).to.equal( 'b' );
+		expect( doc.root.getChild( 1 ).character ).to.equal( 'r' );
 	} );
 
 	it( 'should create a insert operation as a reverse', function() {
@@ -92,9 +92,9 @@ describe( 'RemoveOperation', function() {
 		var reverse = operation.reverseOperation();
 
 		expect( reverse ).to.be.an.instanceof( InsertOperation );
-		expect( reverse.baseVersion ).to.equals( 1 );
-		expect( reverse.nodeList ).to.equals( nodeList );
-		expect( reverse.position ).to.equals( position );
+		expect( reverse.baseVersion ).to.equal( 1 );
+		expect( reverse.nodeList ).to.equal( nodeList );
+		expect( reverse.position ).to.equal( position );
 	} );
 
 	it( 'should undo remove set of nodes by applying reverse operation', function() {
@@ -116,16 +116,16 @@ describe( 'RemoveOperation', function() {
 
 		doc.applyOperation( operation );
 
-		expect( doc.version ).to.be.equal( 1 );
-		expect( doc.root.getChildCount() ).to.be.equal( 0 );
+		expect( doc.version ).to.equal( 1 );
+		expect( doc.root.getChildCount() ).to.equal( 0 );
 
 		doc.applyOperation( reverse );
 
-		expect( doc.version ).to.be.equal( 2 );
-		expect( doc.root.getChildCount() ).to.be.equal( 3 );
-		expect( doc.root.getChild( 0 ).character ).to.be.equal( 'b' );
-		expect( doc.root.getChild( 1 ).character ).to.be.equal( 'a' );
-		expect( doc.root.getChild( 2 ).character ).to.be.equal( 'r' );
+		expect( doc.version ).to.equal( 2 );
+		expect( doc.root.getChildCount() ).to.equal( 3 );
+		expect( doc.root.getChild( 0 ).character ).to.equal( 'b' );
+		expect( doc.root.getChild( 1 ).character ).to.equal( 'a' );
+		expect( doc.root.getChild( 2 ).character ).to.equal( 'r' );
 	}  );
 
 	if ( CKEDITOR.isDebug ) {
@@ -147,4 +147,4 @@ describe( 'RemoveOperation', function() {
 			} ).to.throw( CKEditorError, /operation-remove-node-does-not-exists/ );
 		} );
 	}
-} );
+} );