mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
21 lines
534 B
JavaScript
21 lines
534 B
JavaScript
|
var test = require('tap').test;
|
||
|
var VirtualMachine = require('../../src/index');
|
||
|
|
||
|
var project = require('../fixtures/project_default.json');
|
||
|
|
||
|
test('load default project & run', function (t) {
|
||
|
var vm = new VirtualMachine();
|
||
|
t.doesNotThrow(function () {
|
||
|
vm.start();
|
||
|
vm.clear();
|
||
|
vm.setCompatibilityMode(true);
|
||
|
vm.setTurboMode(false);
|
||
|
vm.loadProject(JSON.stringify(project));
|
||
|
vm.greenFlag();
|
||
|
vm.stopAll();
|
||
|
});
|
||
|
t.
|
||
|
t.end();
|
||
|
process.nextTick(process.exit);
|
||
|
});
|