From 5f72a61b2dba14ec86c8a128060cfb38c29cde00 Mon Sep 17 00:00:00 2001 From: kozbial Date: Wed, 22 Sep 2021 16:02:20 -0700 Subject: [PATCH] Remove unecessary deprecation warnings stubs --- tests/mocha/block_test.js | 3 --- tests/mocha/comment_test.js | 9 --------- tests/mocha/field_registry_test.js | 6 ------ tests/mocha/field_test.js | 4 ---- 4 files changed, 22 deletions(-) diff --git a/tests/mocha/block_test.js b/tests/mocha/block_test.js index 082e43f0c..078c2ee05 100644 --- a/tests/mocha/block_test.js +++ b/tests/mocha/block_test.js @@ -1176,10 +1176,7 @@ suite('Blocks', function() { // Restored up by call to sinon.restore() in sharedTestTeardown() sinon.stub(this.block, 'isEditable').returns(false); var icon = this.block.getCommentIcon(); - // TODO(#4186): Remove stubbing of deprecation warning after fixing. - var deprecationWarnStub = createDeprecationWarningStub(); icon.setVisible(true); - deprecationWarnStub.restore(); this.block.setCommentText('test2'); chai.assert.equal(this.block.getCommentText(), 'test2'); diff --git a/tests/mocha/comment_test.js b/tests/mocha/comment_test.js index 096fe6940..f156ca136 100644 --- a/tests/mocha/comment_test.js +++ b/tests/mocha/comment_test.js @@ -60,10 +60,7 @@ suite('Comments', function() { test('Not Editable', function() { sinon.stub(this.block, 'isEditable').returns(false); - // TODO(#4186): Remove stubbing of deprecation warning after fixing. - var deprecationWarnStub = createDeprecationWarningStub(); this.comment.setVisible(true); - deprecationWarnStub.restore(); chai.assert.isTrue(this.comment.isVisible()); assertNotEditable(this.comment); @@ -76,10 +73,7 @@ suite('Comments', function() { this.comment.setVisible(true); sinon.stub(this.block, 'isEditable').returns(false); - // TODO(#4186): Remove stubbing of deprecation warning after fixing. - var deprecationWarnStub = createDeprecationWarningStub(); this.comment.updateEditable(); - deprecationWarnStub.restore(); chai.assert.isTrue(this.comment.isVisible()); assertNotEditable(this.comment); @@ -91,10 +85,7 @@ suite('Comments', function() { test('Not Editable -> Editable', function() { var editableStub = sinon.stub(this.block, 'isEditable').returns(false); - // TODO(#4186): Remove stubbing of deprecation warning after fixing. - var deprecationWarnStub = createDeprecationWarningStub(); this.comment.setVisible(true); - deprecationWarnStub.restore(); editableStub.returns(true); diff --git a/tests/mocha/field_registry_test.js b/tests/mocha/field_registry_test.js index c8978d1fb..bddb3fc64 100644 --- a/tests/mocha/field_registry_test.js +++ b/tests/mocha/field_registry_test.js @@ -63,10 +63,7 @@ suite('Field Registry', function() { value: 'ok' }; - // TODO(#4197): Remove stubbing of deprecation warning after fixing. - var deprecationWarnStub = createDeprecationWarningStub(); var field = Blockly.fieldRegistry.fromJson(json); - deprecationWarnStub.restore(); chai.assert.isNotNull(field); chai.assert.equal(field.getValue(), 'ok'); @@ -91,10 +88,7 @@ suite('Field Registry', function() { value: 'ok' }; - // TODO(#4197): Remove stubbing of deprecation warning after fixing. - var deprecationWarnStub = createDeprecationWarningStub(); var field = Blockly.fieldRegistry.fromJson(json); - deprecationWarnStub.restore(); chai.assert.isNotNull(field); chai.assert.equal(field.getValue(), 'ok'); diff --git a/tests/mocha/field_test.js b/tests/mocha/field_test.js index ed446df71..dca8bb153 100644 --- a/tests/mocha/field_test.js +++ b/tests/mocha/field_test.js @@ -12,10 +12,6 @@ const {addBlockTypeToCleanup, addMessageToCleanup, createDeprecationWarningStub, suite('Abstract Fields', function() { setup(function() { sharedTestSetup.call(this); - // TODO(#4197): Remove stubbing of deprecation warning after fixing. - // field.setValue calls trigger a deprecation warning, capture to prevent - // console logs. - createDeprecationWarningStub(); }); teardown(function() {