Merge pull request #787 from fsih/deleteMonitorBlocks

Delete monitor block when variable is deleted
This commit is contained in:
DD Liu 2017-11-16 17:20:26 -05:00 committed by GitHub
commit 2d9722e69c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 21 deletions

View file

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