Browse Source

Merge branch t/ckeditor5/1144

Tests: Properly use sinon sandbox in tests t/ckeditor5/1144.
Oskar Wróbel 7 years ago
parent
commit
69a1ee6585

+ 2 - 2
packages/ckeditor5-link/tests/linkui.js

@@ -22,11 +22,11 @@ import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview';
 import Range from '@ckeditor/ckeditor5-engine/src/view/range';
 import ClickObserver from '@ckeditor/ckeditor5-engine/src/view/observer/clickobserver';
 
-testUtils.createSinonSandbox();
-
 describe( 'LinkUI', () => {
 	let editor, linkUIFeature, linkButton, balloon, formView, actionsView, editorElement;
 
+	testUtils.createSinonSandbox();
+
 	beforeEach( () => {
 		editorElement = document.createElement( 'div' );
 		document.body.appendChild( editorElement );

+ 2 - 2
packages/ckeditor5-link/tests/ui/linkactionsview.js

@@ -12,11 +12,11 @@ import FocusCycler from '@ckeditor/ckeditor5-ui/src/focuscycler';
 import ViewCollection from '@ckeditor/ckeditor5-ui/src/viewcollection';
 import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
 
-testUtils.createSinonSandbox();
-
 describe( 'LinkActionsView', () => {
 	let view;
 
+	testUtils.createSinonSandbox();
+
 	beforeEach( () => {
 		view = new LinkActionsView( { t: val => val } );
 		view.render();

+ 2 - 2
packages/ckeditor5-link/tests/ui/linkformview.js

@@ -14,11 +14,11 @@ import FocusCycler from '@ckeditor/ckeditor5-ui/src/focuscycler';
 import ViewCollection from '@ckeditor/ckeditor5-ui/src/viewcollection';
 import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
 
-testUtils.createSinonSandbox();
-
 describe( 'LinkFormView', () => {
 	let view;
 
+	testUtils.createSinonSandbox();
+
 	beforeEach( () => {
 		view = new LinkFormView( { t: val => val } );
 		view.render();

+ 2 - 2
packages/ckeditor5-link/tests/unlinkcommand.js

@@ -8,11 +8,11 @@ import UnlinkCommand from '../src/unlinkcommand';
 import { setData, getData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
 import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
 
-testUtils.createSinonSandbox();
-
 describe( 'UnlinkCommand', () => {
 	let editor, model, document, command;
 
+	testUtils.createSinonSandbox();
+
 	beforeEach( () => {
 		return ModelTestEditor.create()
 			.then( newEditor => {