Browse Source

Tests: Properly use sinon sandbox in tests.

Maciej Gołaszewski 7 years ago
parent
commit
141e1dd60a

+ 2 - 2
packages/ckeditor5-heading/tests/headingui.js

@@ -14,11 +14,11 @@ import { add as addTranslations, _clear as clearTranslations } from '@ckeditor/c
 import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
 import { setData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
 
-testUtils.createSinonSandbox();
-
 describe( 'HeadingUI', () => {
 	let editor, editorElement, dropdown;
 
+	testUtils.createSinonSandbox();
+
 	before( () => {
 		addTranslations( 'en', {
 			'Choose heading': 'Choose heading',

+ 2 - 2
packages/ckeditor5-heading/tests/utils.js

@@ -11,9 +11,9 @@ import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
 import Heading from '../src/heading';
 import { getLocalizedOptions } from '../src/utils';
 
-testUtils.createSinonSandbox();
-
 describe( 'utils', () => {
+	testUtils.createSinonSandbox();
+
 	describe( 'getLocalizedOptions()', () => {
 		let editor, editorElement;