ソースを参照

Tests: Fixed broken test.

Szymon Cofalik 7 年 前
コミット
7dd67f21bf
1 ファイル変更5 行追加6 行削除
  1. 5 6
      packages/ckeditor5-engine/tests/model/document.js

+ 5 - 6
packages/ckeditor5-engine/tests/model/document.js

@@ -20,11 +20,7 @@ describe( 'Document', () => {
 
 	beforeEach( () => {
 		model = new Model();
-		doc = new Document( model );
-
-		// Normally Model is the one who creates Document instance and keeps it as reference.
-		// We have to be sure that Model uses the right Document instance.
-		model.document = doc;
+		doc = model.document;
 	} );
 
 	describe( 'constructor()', () => {
@@ -288,7 +284,10 @@ describe( 'Document', () => {
 
 		it( 'should call all already processed callbacks again if a callback returned true', () => {
 			const callA = sinon.spy();
-			const callB = sinon.stub().onFirstCall().returns( true ).onSecondCall().returns( false );
+
+			const callB = sinon.stub();
+			callB.onFirstCall().returns( true ).onSecondCall().returns( false );
+
 			const callC = sinon.spy();
 
 			doc.registerPostFixer( callA );