Browse Source

Tests: Properly use sinon sandbox in tests.

Maciej Gołaszewski 7 years ago
parent
commit
dccfa3f605

+ 2 - 2
packages/ckeditor5-basic-styles/tests/bold/boldui.js

@@ -13,11 +13,11 @@ import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
 
 import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
 
-testUtils.createSinonSandbox();
-
 describe( 'BoldUI', () => {
 	let editor, boldView;
 
+	testUtils.createSinonSandbox();
+
 	beforeEach( () => {
 		const editorElement = document.createElement( 'div' );
 		document.body.appendChild( editorElement );

+ 2 - 2
packages/ckeditor5-basic-styles/tests/code/codeui.js

@@ -13,11 +13,11 @@ import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
 
 import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
 
-testUtils.createSinonSandbox();
-
 describe( 'CodeUI', () => {
 	let editor, codeView;
 
+	testUtils.createSinonSandbox();
+
 	beforeEach( () => {
 		const editorElement = document.createElement( 'div' );
 		document.body.appendChild( editorElement );

+ 2 - 2
packages/ckeditor5-basic-styles/tests/italic/italicui.js

@@ -14,11 +14,11 @@ import { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard';
 
 import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
 
-testUtils.createSinonSandbox();
-
 describe( 'ItalicUI', () => {
 	let editor, italicView;
 
+	testUtils.createSinonSandbox();
+
 	beforeEach( () => {
 		const editorElement = document.createElement( 'div' );
 		document.body.appendChild( editorElement );

+ 2 - 2
packages/ckeditor5-basic-styles/tests/strikethrough/strikethroughui.js

@@ -14,11 +14,11 @@ import { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard';
 
 import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
 
-testUtils.createSinonSandbox();
-
 describe( 'StrikethroughUI', () => {
 	let editor, strikeView;
 
+	testUtils.createSinonSandbox();
+
 	beforeEach( () => {
 		const editorElement = document.createElement( 'div' );
 		document.body.appendChild( editorElement );

+ 2 - 2
packages/ckeditor5-basic-styles/tests/underline/underlineui.js

@@ -14,11 +14,11 @@ import { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard';
 
 import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
 
-testUtils.createSinonSandbox();
-
 describe( 'Underline', () => {
 	let editor, underlineView;
 
+	testUtils.createSinonSandbox();
+
 	beforeEach( () => {
 		const editorElement = document.createElement( 'div' );
 		document.body.appendChild( editorElement );