test not serializing origin if it is not present

This commit is contained in:
Eric Rosenbaum 2021-05-04 20:29:31 -04:00
parent fb09f9cbb9
commit 7a2393bd56

View file

@ -351,3 +351,13 @@ test('serialize origin value if it is present', t => {
t.end();
});
});
test('do not serialize origin value if it is not present', t => {
const vm = new VirtualMachine();
vm.loadProject(readFileToBuffer(originAbsentSB3ProjectPath))
.then(() => {
const result = sb3.serialize(vm.runtime);
t.equal(result.meta.origin, undefined);
t.end();
});
});