Remove unecessary deprecation warnings stubs

This commit is contained in:
kozbial
2021-09-22 16:02:20 -07:00
committed by Monica Kozbial
parent 8bd2e8c9e2
commit 5f72a61b2d
4 changed files with 0 additions and 22 deletions

View File

@@ -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');

View File

@@ -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);

View File

@@ -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');

View File

@@ -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() {