Skip to content

Commit

Permalink
Tests: Code refactoring.
Browse files Browse the repository at this point in the history
  • Loading branch information
oleq committed Sep 20, 2019
1 parent d0355dd commit f5ea2a9
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions tests/inspector/ckeditorinspector.js
Expand Up @@ -26,9 +26,7 @@ describe( 'CKEditorInspector', () => {
} );

afterEach( () => {
Logger.log.restore();
Logger.warn.restore();

sinon.restore();
element.remove();

CKEditorInspector.destroy();
Expand Down Expand Up @@ -74,9 +72,6 @@ describe( 'CKEditorInspector', () => {
anotherEditorElement.remove();

return anotherEditor.destroy();
} )
.catch( err => {
throw err;
} );
} );

Expand All @@ -94,9 +89,6 @@ describe( 'CKEditorInspector', () => {
expect( secondNames ).to.have.members( [ 'editor-2' ] );

return anotherEditor.destroy();
} )
.catch( err => {
throw err;
} );
} );

Expand Down Expand Up @@ -130,9 +122,6 @@ describe( 'CKEditorInspector', () => {
expect( names ).to.have.members( [ 'foo', 'bar' ] );

return anotherEditor.destroy();
} )
.catch( err => {
throw err;
} );
} );

Expand Down Expand Up @@ -162,10 +151,6 @@ describe( 'CKEditorInspector', () => {

describe( 'options', () => {
describe( '#isCollapsed', () => {
beforeEach( () => {
CKEditorInspector.destroy();
} );

it( 'does nothing if unspecified', () => {
CKEditorInspector.attach( editor );

Expand Down Expand Up @@ -210,9 +195,6 @@ describe( 'CKEditorInspector', () => {
expect( editorNames ).to.have.members( [ 'editor-5', 'editor-6' ] );

return anotherEditor.destroy();
} )
.catch( err => {
throw err;
} );
} );

Expand All @@ -237,9 +219,6 @@ describe( 'CKEditorInspector', () => {
expect( inspectorRef.state.editors.size ).to.equal( 2 );

return anotherEditor.destroy();
} )
.catch( err => {
throw err;
} );
} );

Expand All @@ -259,9 +238,6 @@ describe( 'CKEditorInspector', () => {
spy.restore();

return anotherEditor.destroy();
} )
.catch( err => {
throw err;
} );
} );
} );
Expand Down

0 comments on commit f5ea2a9

Please sign in to comment.