diff --git a/tests/mocha/block_test.js b/tests/mocha/block_test.js index a120fb0ad..6ed4cfb89 100644 --- a/tests/mocha/block_test.js +++ b/tests/mocha/block_test.js @@ -1234,6 +1234,7 @@ suite('Blocks', function() { }); teardown(function() { Blockly.Events.enable(); + workspaceTeardown.call(this, this.workspace); delete Blockly.Blocks['variable_block']; }); suite('Connecting and Disconnecting', function() { diff --git a/tests/mocha/event_test.js b/tests/mocha/event_test.js index 7645303b2..b1be8f7d0 100644 --- a/tests/mocha/event_test.js +++ b/tests/mocha/event_test.js @@ -660,7 +660,7 @@ suite('Events', function() { // Expect the workspace to not have a variable with ID 'test_block_id'. chai.assert.isNull(this.workspace.getVariableById(TEST_BLOCK_ID)); } finally { - workspaceSvg.dispose(); + workspaceTeardown.call(this, workspaceSvg); } }); diff --git a/tests/mocha/field_test.js b/tests/mocha/field_test.js index 98f8762d1..1e4a9988d 100644 --- a/tests/mocha/field_test.js +++ b/tests/mocha/field_test.js @@ -392,7 +392,7 @@ suite('Abstract Fields', function() { this.workspace.createDom(); }); teardown(function() { - this.workspace = null; + workspaceTeardown.call(this, this.workspace); }); test('Before Append', function() { Blockly.Blocks['tooltip'] = { diff --git a/tests/mocha/xml_procedures_test.js b/tests/mocha/xml_procedures_test.js index d4d28ee0c..26a0da858 100644 --- a/tests/mocha/xml_procedures_test.js +++ b/tests/mocha/xml_procedures_test.js @@ -38,7 +38,7 @@ suite('Procedures XML', function() { }; }); teardown(function() { - this.workspace.dispose(); + workspaceTeardown.call(this, this.workspace); }); suite('Definition Blocks', function() {