Browse Source

Tests: Properly use sinon sandbox in tests.

Maciej Gołaszewski 7 years ago
parent
commit
faaf11ce31

+ 3 - 3
packages/ckeditor5-table/tests/converters/downcast.js

@@ -19,14 +19,14 @@ import { formatTable, formattedViewTable, modelTable } from '../_utils/utils';
 import env from '@ckeditor/ckeditor5-utils/src/env';
 import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
 
-testUtils.createSinonSandbox();
-
 describe( 'downcast converters', () => {
 	let editor, model, doc, root, viewDocument;
 
+	testUtils.createSinonSandbox();
+
 	beforeEach( () => {
 		// Most tests assume non-edge environment but we do not set `contenteditable=false` on Edge so stub `env.isEdge`.
-		sinon.stub( env, 'isEdge' ).get( () => false );
+		testUtils.sinon.stub( env, 'isEdge' ).get( () => false );
 
 		return VirtualTestEditor.create()
 			.then( newEditor => {

+ 2 - 2
packages/ckeditor5-table/tests/tableui.js

@@ -15,11 +15,11 @@ import SwitchButtonView from '@ckeditor/ckeditor5-ui/src/button/switchbuttonview
 import DropdownView from '@ckeditor/ckeditor5-ui/src/dropdown/dropdownview';
 import ListSeparatorView from '@ckeditor/ckeditor5-ui/src/list/listseparatorview';
 
-testUtils.createSinonSandbox();
-
 describe( 'TableUI', () => {
 	let editor, element;
 
+	testUtils.createSinonSandbox();
+
 	before( () => {
 		addTranslations( 'en', {} );
 		addTranslations( 'pl', {} );