8
0
Просмотр исходного кода

Tests: Fixed to.be.equal() use.

Piotrek Koszuliński 5 лет назад
Родитель
Сommit
46defe5c19

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

@@ -355,7 +355,7 @@ describe( 'AttributeOperation', () => {
 		const clone = op.clone();
 
 		// New instance rather than a pointer to the old instance.
-		expect( clone ).not.to.be.equal( op );
+		expect( clone ).not.to.equal( op );
 
 		expect( clone ).to.be.instanceof( AttributeOperation );
 		expect( clone.range.isEqual( range ) ).to.be.true;

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

@@ -185,7 +185,7 @@ describe( 'InsertOperation', () => {
 		const clone = op.clone();
 
 		// New instance rather than a pointer to the old instance.
-		expect( clone ).not.to.be.equal( op );
+		expect( clone ).not.to.equal( op );
 
 		expect( clone ).to.be.instanceof( InsertOperation );
 		expect( clone.position.isEqual( position ) ).to.be.true;

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

@@ -202,7 +202,7 @@ describe( 'MergeOperation', () => {
 		const clone = op.clone();
 
 		// New instance rather than a pointer to the old instance.
-		expect( clone ).not.to.be.equal( op );
+		expect( clone ).not.to.equal( op );
 
 		expect( clone ).to.be.instanceof( MergeOperation );
 		expect( clone.sourcePosition.isEqual( sourcePosition ) ).to.be.true;

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

@@ -242,7 +242,7 @@ describe( 'MoveOperation', () => {
 		const clone = op.clone();
 
 		// New instance rather than a pointer to the old instance.
-		expect( clone ).not.to.be.equal( op );
+		expect( clone ).not.to.equal( op );
 
 		expect( clone ).to.be.instanceof( MoveOperation );
 		expect( clone.sourcePosition.isEqual( sourcePosition ) ).to.be.true;

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

@@ -94,7 +94,7 @@ describe( 'RenameOperation', () => {
 		const clone = op.clone();
 
 		// New instance rather than a pointer to the old instance.
-		expect( clone ).not.to.be.equal( op );
+		expect( clone ).not.to.equal( op );
 
 		expect( clone ).to.be.instanceof( RenameOperation );
 		expect( clone.baseVersion ).to.equal( op.baseVersion );

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

@@ -247,7 +247,7 @@ describe( 'RootAttributeOperation', () => {
 		const clone = op.clone();
 
 		// New instance rather than a pointer to the old instance.
-		expect( clone ).not.to.be.equal( op );
+		expect( clone ).not.to.equal( op );
 
 		expect( clone ).to.be.instanceof( RootAttributeOperation );
 		expect( clone.root ).to.equal( root );

+ 2 - 2
packages/ckeditor5-engine/tests/model/operation/splitoperation.js

@@ -171,7 +171,7 @@ describe( 'SplitOperation', () => {
 		const clone = op.clone();
 
 		// New instance rather than a pointer to the old instance.
-		expect( clone ).not.to.be.equal( op );
+		expect( clone ).not.to.equal( op );
 
 		expect( clone ).to.be.instanceof( SplitOperation );
 		expect( clone.splitPosition.isEqual( position ) ).to.be.true;
@@ -191,7 +191,7 @@ describe( 'SplitOperation', () => {
 		const clone = op.clone();
 
 		// New instance rather than a pointer to the old instance.
-		expect( clone ).not.to.be.equal( op );
+		expect( clone ).not.to.equal( op );
 
 		expect( clone ).to.be.instanceof( SplitOperation );
 		expect( clone.splitPosition.isEqual( position ) ).to.be.true;

+ 2 - 2
packages/ckeditor5-engine/tests/model/range.js

@@ -211,7 +211,7 @@ describe( 'Range', () => {
 			it( 'should create a new instance of Range that is equal to passed range', () => {
 				const clone = range.clone();
 
-				expect( clone ).not.to.be.equal( range ); // clone is not pointing to the same object as position
+				expect( clone ).not.to.equal( range ); // clone is not pointing to the same object as position
 				expect( clone.isEqual( range ) ).to.be.true; // but they are equal in the position-sense
 			} );
 		} );
@@ -242,7 +242,7 @@ describe( 'Range', () => {
 				const range = Range._createFromRanges( [ original ] );
 
 				expect( range.isEqual( original ) ).to.be.true;
-				expect( range ).not.to.be.equal( original );
+				expect( range ).not.to.equal( original );
 			} );
 
 			it( 'should combine ranges with reference range', () => {

+ 2 - 2
packages/ckeditor5-engine/tests/model/selection.js

@@ -687,8 +687,8 @@ describe( 'Selection', () => {
 			expect( ranges.length ).to.equal( 2 );
 			expect( ranges[ 0 ].isEqual( liveRange ) ).to.be.true;
 			expect( ranges[ 1 ].isEqual( range ) ).to.be.true;
-			expect( ranges[ 0 ] ).not.to.be.equal( liveRange );
-			expect( ranges[ 1 ] ).not.to.be.equal( range );
+			expect( ranges[ 0 ] ).not.to.equal( liveRange );
+			expect( ranges[ 1 ] ).not.to.equal( range );
 		} );
 
 		it( 'should set anchor and focus to the start and end of the last added range', () => {

+ 1 - 1
packages/ckeditor5-engine/tests/view/domconverter/uielement.js

@@ -75,7 +75,7 @@ describe( 'DOMConverter UIElement integration', () => {
 			const domSpan = domParagraph.childNodes[ 0 ];
 
 			expect( converter.domToView( domParagraph ) ).to.equal( uiElement );
-			expect( converter.domToView( domSpan ) ).to.be.equal( uiElement );
+			expect( converter.domToView( domSpan ) ).to.equal( uiElement );
 			expect( converter.domToView( domParagraph.childNodes[ 0 ] ) ).equal( uiElement );
 			expect( converter.domToView( domSpan.childNodes[ 0 ] ) ).equal( uiElement );
 		} );

+ 1 - 1
packages/ckeditor5-engine/tests/view/element.js

@@ -416,7 +416,7 @@ describe( 'Element', () => {
 
 				parent._insertChild( 0, anotherEl );
 
-				expect( anotherEl.document ).to.be.equal( document );
+				expect( anotherEl.document ).to.equal( document );
 			} );
 		} );
 

+ 2 - 2
packages/ckeditor5-engine/tests/view/observer/mutationobserver.js

@@ -569,7 +569,7 @@ describe( 'MutationObserver', () => {
 
 			mutationObserver.flush();
 
-			expect( renderStub.callCount ).to.be.equal( 0 );
+			expect( renderStub.callCount ).to.equal( 0 );
 		} );
 
 		it( 'should not collect child mutations from UIElement', () => {
@@ -587,7 +587,7 @@ describe( 'MutationObserver', () => {
 
 			mutationObserver.flush();
 
-			expect( renderStub.callCount ).to.be.equal( 0 );
+			expect( renderStub.callCount ).to.equal( 0 );
 		} );
 	} );
 

+ 4 - 4
packages/ckeditor5-engine/tests/view/renderer.js

@@ -1818,7 +1818,7 @@ describe( 'Renderer', () => {
 					selection._setTo( selection.getRanges(), { fake: true, label } );
 					renderer.render();
 
-					expect( createRangeSpy.callCount ).to.be.equal( 1 );
+					expect( createRangeSpy.callCount ).to.equal( 1 );
 				} );
 
 				it( 'different subsequent fake selections sets do change native selection', () => {
@@ -1829,7 +1829,7 @@ describe( 'Renderer', () => {
 					selection._setTo( selection.getRanges(), { fake: true, label: 'selection 2' } );
 					renderer.render();
 
-					expect( createRangeSpy.callCount ).to.be.equal( 2 );
+					expect( createRangeSpy.callCount ).to.equal( 2 );
 				} );
 
 				it( 'rerenders selection if disturbed externally', () => {
@@ -1849,7 +1849,7 @@ describe( 'Renderer', () => {
 					selection._setTo( selection.getRanges(), { fake: true, label } );
 					renderer.render();
 
-					expect( createRangeSpy.callCount ).to.be.equal( 2 );
+					expect( createRangeSpy.callCount ).to.equal( 2 );
 				} );
 
 				it( 'correctly maps fake selection ', () => {
@@ -1868,7 +1868,7 @@ describe( 'Renderer', () => {
 					const fakeSelectionContainer = domRoot.childNodes[ 1 ];
 					const mappedSelection = renderer.domConverter.fakeSelectionToView( fakeSelectionContainer );
 
-					expect( stringify( viewRoot, mappedSelection ) ).to.be.equal( '<div><p>foo bar</p><p>[baz]</p></div>' );
+					expect( stringify( viewRoot, mappedSelection ) ).to.equal( '<div><p>foo bar</p><p>[baz]</p></div>' );
 				} );
 			} );