mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-28 22:30:40 -04:00
Merge pull request #787 from fsih/deleteMonitorBlocks
Delete monitor block when variable is deleted
This commit is contained in:
commit
2d9722e69c
3 changed files with 19 additions and 21 deletions
|
@ -421,9 +421,7 @@ test('delete', t => {
|
|||
inputs: {},
|
||||
topLevel: true
|
||||
});
|
||||
b.deleteBlock({
|
||||
id: 'foo'
|
||||
});
|
||||
b.deleteBlock('foo');
|
||||
|
||||
t.type(b._blocks.foo, 'undefined');
|
||||
t.equal(b._scripts.indexOf('foo'), -1);
|
||||
|
@ -458,9 +456,7 @@ test('delete chain', t => {
|
|||
inputs: {},
|
||||
topLevel: false
|
||||
});
|
||||
b.deleteBlock({
|
||||
id: 'foo'
|
||||
});
|
||||
b.deleteBlock('foo');
|
||||
t.type(b._blocks.foo, 'undefined');
|
||||
t.type(b._blocks.foo2, 'undefined');
|
||||
t.type(b._blocks.foo3, 'undefined');
|
||||
|
@ -531,9 +527,7 @@ test('delete inputs', t => {
|
|||
inputs: {},
|
||||
topLevel: false
|
||||
});
|
||||
b.deleteBlock({
|
||||
id: 'foo'
|
||||
});
|
||||
b.deleteBlock('foo');
|
||||
t.type(b._blocks.foo, 'undefined');
|
||||
t.type(b._blocks.foo2, 'undefined');
|
||||
t.type(b._blocks.foo3, 'undefined');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue