Parcourir la source

Revert "Test deprecation warning with testUtils"

This reverts commit 3a44063153600970c861f73a50f85da345b4c782.
panr il y a 5 ans
Parent
commit
78269780d6
1 fichiers modifiés avec 3 ajouts et 8 suppressions
  1. 3 8
      packages/ckeditor5-ui/tests/labeledinput/labeledinputview.js

+ 3 - 8
packages/ckeditor5-ui/tests/labeledinput/labeledinputview.js

@@ -10,17 +10,13 @@ import LabeledInputView from '../../src/labeledinput/labeledinputview';
 import InputView from '../../src/inputtext/inputtextview';
 import LabelView from '../../src/label/labelview';
 
-import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
-
 describe( 'LabeledInputView', () => {
 	const locale = {};
 
-	testUtils.createSinonSandbox();
-
 	let view, deprecatedWarning;
 
 	beforeEach( () => {
-		deprecatedWarning = testUtils.sinon.stub( console, 'warn' );
+		deprecatedWarning = sinon.stub( console, 'warn' );
 		view = new LabeledInputView( locale, InputView );
 
 		view.render();
@@ -33,12 +29,11 @@ describe( 'LabeledInputView', () => {
 	describe( 'constructor()', () => {
 		describe( 'deprecation warning', () => {
 			it( 'should be shown in the console after component initialization', () => {
-				expect( deprecatedWarning.called ).to.be.true;
-				expect( deprecatedWarning.callCount ).to.be.equal( 1 );
+				sinon.assert.calledOnce( deprecatedWarning );
 			} );
 
 			it( 'should inform about using LabeledFieldView instead of LabeledInputView', () => {
-				expect( deprecatedWarning.calledWithMatch( 'Please use LabeledFieldView component instead' ) ).to.be.true;
+				sinon.assert.calledWithMatch( deprecatedWarning, 'Please use LabeledFieldView component instead' );
 			} );
 		} );