ソースを参照

Add tests for model.createBatch() type parameter.

Maciej Gołaszewski 6 年 前
コミット
3575b23f2b
1 ファイル変更9 行追加1 行削除
  1. 9 1
      packages/ckeditor5-engine/tests/model/model.js

+ 9 - 1
packages/ckeditor5-engine/tests/model/model.js

@@ -774,7 +774,15 @@ describe( 'Model', () => {
 
 	describe( 'createBatch()', () => {
 		it( 'should return instance of Batch', () => {
-			expect( model.createBatch() ).to.be.instanceof( Batch );
+			const batch = model.createBatch();
+			expect( batch ).to.be.instanceof( Batch );
+			expect( batch.type ).to.equal( 'default' );
+		} );
+
+		it( 'should allow to define type of Batch', () => {
+			const batch = model.createBatch( 'transparent' );
+			expect( batch ).to.be.instanceof( Batch );
+			expect( batch.type ).to.equal( 'transparent' );
 		} );
 	} );