mirror of
https://github.com/google/blockly.git
synced 2026-01-10 02:17:09 +01:00
Fix workspace cleanup in tests. (#4169)
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -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'] = {
|
||||
|
||||
@@ -38,7 +38,7 @@ suite('Procedures XML', function() {
|
||||
};
|
||||
});
|
||||
teardown(function() {
|
||||
this.workspace.dispose();
|
||||
workspaceTeardown.call(this, this.workspace);
|
||||
});
|
||||
|
||||
suite('Definition Blocks', function() {
|
||||
|
||||
Reference in New Issue
Block a user