mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
20 lines
551 B
JavaScript
20 lines
551 B
JavaScript
|
var test = require('tap').test;
|
||
|
var VirtualMachine = require('../../src/index');
|
||
|
var sb3 = require('../../src/serialization/sb3');
|
||
|
|
||
|
test('serialize', function (t) {
|
||
|
var vm = new VirtualMachine();
|
||
|
vm.fromJSON(JSON.stringify(require('../fixtures/demo.json')));
|
||
|
var result = sb3.serialize(vm.runtime);
|
||
|
console.dir(JSON.stringify(result));
|
||
|
// @todo Analyize
|
||
|
t.end();
|
||
|
});
|
||
|
|
||
|
test('deserialize', function (t) {
|
||
|
var vm = new VirtualMachine();
|
||
|
var result = sb3.deserialize('', vm.runtime);
|
||
|
// @todo Analyize
|
||
|
t.end();
|
||
|
});
|