From 7a2393bd5605ddd4069e92d6f4740972435ba124 Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum <eric.rosenbaum@gmail.com> Date: Tue, 4 May 2021 20:29:31 -0400 Subject: [PATCH] test not serializing origin if it is not present --- test/unit/serialization_sb3.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/unit/serialization_sb3.js b/test/unit/serialization_sb3.js index 91eff7e64..efba61e92 100644 --- a/test/unit/serialization_sb3.js +++ b/test/unit/serialization_sb3.js @@ -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(); + }); +});