mirror of
https://github.com/google/blockly.git
synced 2026-01-08 09:30:06 +01:00
fix: disposing workspace comments. (#7264)
* fix: disposing workspace comments. * whitespace formatting
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
|
||||
goog.declareModuleId('Blockly.test.workspaceComment');
|
||||
|
||||
import {WorkspaceComment} from '../../build/src/core/workspace_comment.js';
|
||||
import {
|
||||
sharedTestSetup,
|
||||
sharedTestTeardown,
|
||||
@@ -166,6 +165,19 @@ suite('Workspace comment', function () {
|
||||
// Nothing should go wrong the second time dispose is called.
|
||||
comment.dispose();
|
||||
});
|
||||
|
||||
test('WorkspaceCommentSvg disposed', function () {
|
||||
const comment = new Blockly.WorkspaceCommentSvg(
|
||||
this.workspace,
|
||||
'comment text',
|
||||
0,
|
||||
0,
|
||||
'comment id'
|
||||
);
|
||||
comment.dispose();
|
||||
// Nothing should go wrong the second time dispose is called.
|
||||
comment.dispose();
|
||||
});
|
||||
});
|
||||
|
||||
suite('Width and height', function () {
|
||||
|
||||
Reference in New Issue
Block a user