Clean up calls to fixUpVariableReferences

This commit is contained in:
Karishma Chadha 2018-06-25 09:11:48 -04:00
parent b40ac54fdd
commit f06b8a3943
2 changed files with 4 additions and 6 deletions

View file

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