mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-11 21:43:58 -04:00
Create a new addTarget
function on the runtime which populates the targets list as well as the executable targets list.
This commit is contained in:
parent
fbee37e915
commit
59a865ef47
7 changed files with 21 additions and 24 deletions
test/unit
|
@ -188,7 +188,7 @@ test('renameVariable calls cloud io device\'s requestRenameVariable function', t
|
|||
target.isStage = true;
|
||||
const mockCloudVar = new Variable('foo', 'bar', Variable.SCALAR_TYPE, true);
|
||||
target.variables[mockCloudVar.id] = mockCloudVar;
|
||||
runtime.targets.push(target);
|
||||
runtime.addTarget(target);
|
||||
|
||||
target.renameVariable('foo', 'bar2');
|
||||
|
||||
|
@ -215,7 +215,7 @@ test('renameVariable does not call cloud io device\'s requestRenameVariable func
|
|||
const target = new Target(runtime);
|
||||
const mockCloudVar = new Variable('foo', 'bar', Variable.SCALAR_TYPE, true);
|
||||
target.variables[mockCloudVar.id] = mockCloudVar;
|
||||
runtime.targets.push(target);
|
||||
runtime.addTarget(target);
|
||||
|
||||
target.renameVariable('foo', 'bar2');
|
||||
|
||||
|
@ -266,7 +266,7 @@ test('deleteVariable calls cloud io device\'s requestRenameVariable function', t
|
|||
target.isStage = true;
|
||||
const mockCloudVar = new Variable('foo', 'bar', Variable.SCALAR_TYPE, true);
|
||||
target.variables[mockCloudVar.id] = mockCloudVar;
|
||||
runtime.targets.push(target);
|
||||
runtime.addTarget(target);
|
||||
|
||||
target.deleteVariable('foo');
|
||||
|
||||
|
@ -288,7 +288,7 @@ test('deleteVariable calls cloud io device\'s requestRenameVariable function', t
|
|||
const target = new Target(runtime);
|
||||
const mockCloudVar = new Variable('foo', 'bar', Variable.SCALAR_TYPE, true);
|
||||
target.variables[mockCloudVar.id] = mockCloudVar;
|
||||
runtime.targets.push(target);
|
||||
runtime.addTarget(target);
|
||||
|
||||
target.deleteVariable('foo');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue