Fix tests involving scratch-storage

- Attach the storage module to the VM for tests which load projects or
  other assets.
- Move `import_sb2.js` from `test/unit/ into `test/integration` since it
  now depends heavily on `scratch-storage`.
- Skip loading costumes when there is no renderer.
This commit is contained in:
Christopher Willis-Ford 2017-03-09 15:50:43 -08:00
parent c23e9c6bf8
commit e4fd9d57a2
15 changed files with 77 additions and 5 deletions
test/integration

View file

@ -1,5 +1,6 @@
var path = require('path');
var test = require('tap').test;
var attachTestStorage = require('../fixtures/attach-test-storage');
var extract = require('../fixtures/extract');
var VirtualMachine = require('../../src/index');
@ -8,6 +9,7 @@ var project = extract(uri);
test('looks', function (t) {
var vm = new VirtualMachine();
attachTestStorage(vm);
// Evaluate playground data and exit
vm.on('playgroundData', function (e) {