mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-13 23:10:56 -04:00
Clean up calls to fixUpVariableReferences
This commit is contained in:
parent
b40ac54fdd
commit
f06b8a3943
2 changed files with 4 additions and 6 deletions
test/unit
|
@ -306,7 +306,7 @@ test('fixUpVariableReferences fixes sprite global var conflicting with project g
|
|||
t.type(target.blocks.getBlock('a block').fields.VARIABLE, 'object');
|
||||
t.equal(target.blocks.getBlock('a block').fields.VARIABLE.id, 'mock var id');
|
||||
|
||||
target.fixUpVariableReferences(target, runtime);
|
||||
target.fixUpVariableReferences();
|
||||
|
||||
t.equal(Object.keys(target.variables).length, 0);
|
||||
t.equal(Object.keys(stage.variables).length, 1);
|
||||
|
@ -344,7 +344,7 @@ test('fixUpVariableReferences fixes sprite local var conflicting with project gl
|
|||
t.equal(target.blocks.getBlock('a block').fields.VARIABLE.id, 'mock var id');
|
||||
t.equal(target.variables['mock var id'].name, 'a mock variable');
|
||||
|
||||
target.fixUpVariableReferences(target, runtime);
|
||||
target.fixUpVariableReferences();
|
||||
|
||||
t.equal(Object.keys(target.variables).length, 1);
|
||||
t.equal(Object.keys(stage.variables).length, 1);
|
||||
|
@ -378,7 +378,7 @@ test('fixUpVariableReferences fixes conflicting sprite local var without blocks
|
|||
t.equal(Object.keys(stage.variables).length, 1);
|
||||
t.equal(target.variables['mock var id'].name, 'a mock variable');
|
||||
|
||||
target.fixUpVariableReferences(target, runtime);
|
||||
target.fixUpVariableReferences();
|
||||
|
||||
t.equal(Object.keys(target.variables).length, 1);
|
||||
t.equal(Object.keys(stage.variables).length, 1);
|
||||
|
@ -414,7 +414,7 @@ test('fixUpVariableReferences does not change variable name if there is no varia
|
|||
t.equal(target.blocks.getBlock('a block').fields.VARIABLE.id, 'mock var id');
|
||||
t.equal(target.variables['mock var id'].name, 'a mock variable');
|
||||
|
||||
target.fixUpVariableReferences(target, runtime);
|
||||
target.fixUpVariableReferences();
|
||||
|
||||
t.equal(Object.keys(target.variables).length, 1);
|
||||
t.equal(Object.keys(stage.variables).length, 2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue