浏览代码

Remove unit test which are no longer valid.

Mateusz Samsel 6 年之前
父节点
当前提交
2e6b14ae5a

+ 0 - 20
packages/ckeditor5-engine/tests/model/batch.js

@@ -60,24 +60,4 @@ describe( 'Batch', () => {
 			expect( batch.baseVersion ).to.equal( null );
 		} );
 	} );
-
-	describe( 'is()', () => {
-		let batch;
-
-		beforeEach( () => {
-			batch = new Batch();
-		} );
-
-		it( 'should return true for "batch"', () => {
-			expect( batch.is( 'batch' ) ).to.be.true;
-			expect( batch.is( 'model:batch' ) ).to.be.true;
-		} );
-
-		it( 'should return false for incorrect values', () => {
-			expect( batch.is( 'model' ) ).to.be.false;
-			expect( batch.is( 'node' ) ).to.be.false;
-			expect( batch.is( 'model:element' ) ).to.be.false;
-			expect( batch.is( 'element', 'paragraph' ) ).to.be.false;
-		} );
-	} );
 } );

+ 0 - 14
packages/ckeditor5-engine/tests/model/differ.js

@@ -36,20 +36,6 @@ describe( 'Differ', () => {
 		] );
 	} );
 
-	describe( 'is()', () => {
-		it( 'should return true for "differ"', () => {
-			expect( differ.is( 'differ' ) ).to.be.true;
-			expect( differ.is( 'model:differ' ) ).to.be.true;
-		} );
-
-		it( 'should return false for incorrect values', () => {
-			expect( differ.is( 'model' ) ).to.be.false;
-			expect( differ.is( 'model:node' ) ).to.be.false;
-			expect( differ.is( 'text' ) ).to.be.false;
-			expect( differ.is( 'element', 'paragraph' ) ).to.be.false;
-		} );
-	} );
-
 	describe( 'insert', () => {
 		// Simple.
 		it( 'an element', () => {

+ 0 - 15
packages/ckeditor5-engine/tests/model/document.js

@@ -499,19 +499,4 @@ describe( 'Document', () => {
 		expect( serialized.selection ).to.equal( '[engine.model.DocumentSelection]' );
 		expect( serialized.model ).to.equal( '[engine.model.Model]' );
 	} );
-
-	describe( 'is()', () => {
-		it( 'should return true for "document"', () => {
-			expect( doc.is( 'document' ) ).to.be.true;
-			expect( doc.is( 'model:document' ) ).to.be.true;
-		} );
-
-		it( 'should return false for incorrect values', () => {
-			expect( doc.is( 'model' ) ).to.be.false;
-			expect( doc.is( 'node' ) ).to.be.false;
-			expect( doc.is( 'model:node' ) ).to.be.false;
-			expect( doc.is( 'view:document' ) ).to.be.false;
-			expect( doc.is( 'element', 'text' ) ).to.be.false;
-		} );
-	} );
 } );

+ 0 - 14
packages/ckeditor5-engine/tests/model/history.js

@@ -178,20 +178,6 @@ describe( 'History', () => {
 			expect( history.getUndoneOperation( op ) ).to.be.undefined;
 		} );
 	} );
-
-	describe( 'is()', () => {
-		it( 'should return true for "history"', () => {
-			expect( history.is( 'history' ) ).to.be.true;
-			expect( history.is( 'model:history' ) ).to.be.true;
-		} );
-
-		it( 'should return false for incorrect values', () => {
-			expect( history.is( 'model' ) ).to.be.false;
-			expect( history.is( 'model:node' ) ).to.be.false;
-			expect( history.is( 'text' ) ).to.be.false;
-			expect( history.is( 'element', 'paragraph' ) ).to.be.false;
-		} );
-	} );
 } );
 
 function getOperations() {

+ 0 - 14
packages/ckeditor5-engine/tests/model/markercollection.js

@@ -146,20 +146,6 @@ describe( 'MarkerCollection', () => {
 		} );
 	} );
 
-	describe( 'is()', () => {
-		it( 'should return true for "markerCollection"', () => {
-			expect( markers.is( 'markerCollection' ) ).to.be.true;
-			expect( markers.is( 'model:markerCollection' ) ).to.be.true;
-		} );
-
-		it( 'should return false for incorrect values', () => {
-			expect( markers.is( 'model' ) ).to.be.false;
-			expect( markers.is( 'model:node' ) ).to.be.false;
-			expect( markers.is( 'text' ) ).to.be.false;
-			expect( markers.is( 'element', 'paragraph' ) ).to.be.false;
-		} );
-	} );
-
 	describe( '_remove', () => {
 		it( 'should remove marker, return true and fire update:<markerName> event', () => {
 			const marker = markers._set( 'name', range );

+ 0 - 13
packages/ckeditor5-engine/tests/model/model.js

@@ -808,17 +808,4 @@ describe( 'Model', () => {
 			sinon.assert.notCalled( spy );
 		} );
 	} );
-
-	describe( 'is()', () => {
-		it( 'should return true for "model"', () => {
-			expect( model.is( 'model' ) ).to.be.true;
-		} );
-
-		it( 'should return false for incorrect values', () => {
-			expect( model.is( 'view' ) ).to.be.false;
-			expect( model.is( 'model:node' ) ).to.be.false;
-			expect( model.is( 'text' ) ).to.be.false;
-			expect( model.is( 'element', 'paragraph' ) ).to.be.false;
-		} );
-	} );
 } );

+ 0 - 14
packages/ckeditor5-engine/tests/model/nodelist.js

@@ -32,20 +32,6 @@ describe( 'NodeList', () => {
 		} );
 	} );
 
-	describe( 'is()', () => {
-		it( 'should return true for "nodeList"', () => {
-			expect( nodes.is( 'nodeList' ) ).to.be.true;
-			expect( nodes.is( 'model:nodeList' ) ).to.be.true;
-		} );
-
-		it( 'should return false for incorrect values', () => {
-			expect( nodes.is( 'model' ) ).to.be.false;
-			expect( nodes.is( 'model:node' ) ).to.be.false;
-			expect( nodes.is( 'text' ) ).to.be.false;
-			expect( nodes.is( 'element', 'paragraph' ) ).to.be.false;
-		} );
-	} );
-
 	describe( 'iterator', () => {
 		it( 'should iterate over all nodes from node list', () => {
 			expect( Array.from( nodes ) ).to.deep.equal( [ p, foo, img ] );

+ 0 - 14
packages/ckeditor5-engine/tests/model/schema.js

@@ -311,20 +311,6 @@ describe( 'Schema', () => {
 		} );
 	} );
 
-	describe( 'is()', () => {
-		it( 'should return true for "schema"', () => {
-			expect( schema.is( 'schema' ) ).to.be.true;
-			expect( schema.is( 'model:schema' ) ).to.be.true;
-		} );
-
-		it( 'should return false for incorrect values', () => {
-			expect( schema.is( 'model' ) ).to.be.false;
-			expect( schema.is( 'model:node' ) ).to.be.false;
-			expect( schema.is( 'text' ) ).to.be.false;
-			expect( schema.is( 'element', 'paragraph' ) ).to.be.false;
-		} );
-	} );
-
 	describe( 'isRegistered()', () => {
 		it( 'returns true if an item was registered', () => {
 			schema.register( 'foo' );

+ 0 - 20
packages/ckeditor5-engine/tests/model/treewalker.js

@@ -69,26 +69,6 @@ describe( 'TreeWalker', () => {
 		} );
 	} );
 
-	describe( 'is()', () => {
-		let treeWalker;
-
-		beforeEach( () => {
-			treeWalker = new TreeWalker( { startPosition: rootBeginning } );
-		} );
-
-		it( 'should return true for "treeWalker"', () => {
-			expect( treeWalker.is( 'treeWalker' ) ).to.be.true;
-			expect( treeWalker.is( 'model:treeWalker' ) ).to.be.true;
-		} );
-
-		it( 'should return false for incorrect values', () => {
-			expect( treeWalker.is( 'model' ) ).to.be.false;
-			expect( treeWalker.is( 'model:node' ) ).to.be.false;
-			expect( treeWalker.is( 'text' ) ).to.be.false;
-			expect( treeWalker.is( 'element', 'paragraph' ) ).to.be.false;
-		} );
-	} );
-
 	describe( 'iterate from start position `startPosition`', () => {
 		let expected;
 

+ 0 - 20
packages/ckeditor5-engine/tests/model/writer.js

@@ -86,26 +86,6 @@ describe( 'Writer', () => {
 		} );
 	} );
 
-	describe( 'is()', () => {
-		let writer;
-
-		beforeEach( () => {
-			writer = new Writer( model, batch );
-		} );
-
-		it( 'should return true for "writer"', () => {
-			expect( writer.is( 'writer' ) ).to.be.true;
-			expect( writer.is( 'model:writer' ) ).to.be.true;
-		} );
-
-		it( 'should return false for incorrect values', () => {
-			expect( writer.is( 'model' ) ).to.be.false;
-			expect( writer.is( 'model:node' ) ).to.be.false;
-			expect( writer.is( 'text' ) ).to.be.false;
-			expect( writer.is( 'element', 'paragraph' ) ).to.be.false;
-		} );
-	} );
-
 	describe( 'insert()', () => {
 		it( 'should insert node at given position', () => {
 			const parent = createDocumentFragment();