mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-22 12:09:51 -04:00
Fix up tests.
This commit is contained in:
parent
003ed01015
commit
b4f6f24926
2 changed files with 8 additions and 6 deletions
|
@ -33,7 +33,7 @@ const serializeBlock = function (block) {
|
||||||
obj.parent = block.parent;
|
obj.parent = block.parent;
|
||||||
obj.inputs = block.inputs;
|
obj.inputs = block.inputs;
|
||||||
obj.fields = block.fields;
|
obj.fields = block.fields;
|
||||||
obj.topLevel = block.topLevel;
|
obj.topLevel = block.topLevel ? block.topLevel : false;
|
||||||
obj.shadow = block.shadow;
|
obj.shadow = block.shadow;
|
||||||
if (block.topLevel) {
|
if (block.topLevel) {
|
||||||
if (block.x) {
|
if (block.x) {
|
||||||
|
|
|
@ -5,11 +5,13 @@ const demoSb3 = require('../fixtures/demo.json');
|
||||||
|
|
||||||
test('serialize', t => {
|
test('serialize', t => {
|
||||||
const vm = new VirtualMachine();
|
const vm = new VirtualMachine();
|
||||||
vm.fromJSON(JSON.stringify(demoSb3));
|
vm.fromJSON(JSON.stringify(demoSb3))
|
||||||
const result = sb3.serialize(vm.runtime);
|
.then(() => {
|
||||||
// @todo Analyze
|
const result = sb3.serialize(vm.runtime);
|
||||||
t.type(JSON.stringify(result), 'string');
|
// @todo Analyze
|
||||||
t.end();
|
t.type(JSON.stringify(result), 'string');
|
||||||
|
t.end();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test('deserialize', t => {
|
test('deserialize', t => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue