8
0
فهرست منبع

Stubbed and tested console warnings.

Maciej Bukowski 6 سال پیش
والد
کامیت
9b656bb8ea
1فایلهای تغییر یافته به همراه7 افزوده شده و 4 حذف شده
  1. 7 4
      packages/ckeditor5-utils/tests/locale.js

+ 7 - 4
packages/ckeditor5-utils/tests/locale.js

@@ -6,17 +6,18 @@
 /* globals console */
 
 import Locale from '../src/locale';
-import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
 
 describe( 'Locale', () => {
 	let locale;
 
-	testUtils.createSinonSandbox();
-
 	beforeEach( () => {
 		locale = new Locale();
 	} );
 
+	afterEach( () => {
+		sinon.restore();
+	} );
+
 	describe( 'constructor', () => {
 		it( 'sets the #language', () => {
 			const locale = new Locale( {
@@ -149,11 +150,13 @@ describe( 'Locale', () => {
 
 	describe( 'language()', () => {
 		it( 'should return #uiLanguage', () => {
+			sinon.stub( console, 'warn' );
+
 			expect( locale.language ).to.equal( locale.uiLanguage );
 		} );
 
 		it( 'should warn about deprecation', () => {
-			const stub = testUtils.sinon.stub( console, 'warn' );
+			const stub = sinon.stub( console, 'warn' );
 
 			expect( locale.language ).to.equal( 'en' );
 			sinon.assert.calledWithMatch( stub, 'locale-deprecated-language-property' );