浏览代码

Improved tests.

Maciej Bukowski 5 年之前
父节点
当前提交
12e5e0f2a1
共有 1 个文件被更改,包括 5 次插入6 次删除
  1. 5 6
      packages/ckeditor5-watchdog/tests/utils/areconnectedthroughproperties.js

+ 5 - 6
packages/ckeditor5-watchdog/tests/utils/areconnectedthroughproperties.js

@@ -250,6 +250,11 @@ describe( 'areConnectedThroughProperties()', () => {
 	} );
 
 	describe( 'integration tests', () => {
+		afterEach( () => {
+			delete Editor.builtinPlugins;
+			delete Editor.defaultConfig;
+		} );
+
 		it( 'should return false for two different editors', () => {
 			const editor1 = new Editor( {} );
 			const editor2 = new Editor( {} );
@@ -266,8 +271,6 @@ describe( 'areConnectedThroughProperties()', () => {
 			const editor2 = new Editor();
 
 			expect( areConnectedThroughProperties( editor1, editor2 ) ).to.be.false;
-
-			delete Editor.builtinPlugins;
 		} );
 
 		it( 'should return false for two different editors inheriting default configuration', () => {
@@ -281,8 +284,6 @@ describe( 'areConnectedThroughProperties()', () => {
 			const editor2 = new Editor();
 
 			expect( areConnectedThroughProperties( editor1, editor2 ) ).to.be.false;
-
-			delete Editor.defaultConfig;
 		} );
 
 		it( 'should return false for two different editors sharing builtin plugins', () => {
@@ -294,8 +295,6 @@ describe( 'areConnectedThroughProperties()', () => {
 			const editor2 = new Editor();
 
 			expect( areConnectedThroughProperties( editor1, editor2 ) ).to.be.false;
-
-			delete Editor.builtinPlugins;
 		} );
 	} );
 } );