Merge pull request from kchadha/serialization-cleanup

SB3 Serialization & Load Project
This commit is contained in:
kchadha 2018-03-23 10:11:49 -04:00 committed by GitHub
commit dbc7b9597f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 202 additions and 74 deletions

View file

@ -5,11 +5,13 @@ const demoSb3 = require('../fixtures/demo.json');
test('serialize', t => {
const vm = new VirtualMachine();
vm.fromJSON(JSON.stringify(demoSb3));
const result = sb3.serialize(vm.runtime);
// @todo Analyze
t.type(JSON.stringify(result), 'string');
t.end();
vm.loadProject(JSON.stringify(demoSb3))
.then(() => {
const result = sb3.serialize(vm.runtime);
// @todo Analyze
t.type(JSON.stringify(result), 'string');
t.end();
});
});
test('deserialize', t => {