All tests passing

This commit is contained in:
Andrew Sliwinski 2016-04-26 09:54:14 -04:00
parent 981b85e78f
commit 389d112729
10 changed files with 10 additions and 27 deletions

View file

@ -25,9 +25,6 @@ test:
coverage:
$(TAP) ./test/{unit,integration}/*.js --coverage --coverage-report=lcov
benchmark:
$(NODE) ./test/benchmark/performance.js
# ------------------------------------------------------------------------------
.PHONY: build lint test coverage benchmark

View file

@ -18,7 +18,6 @@
"memoizee": "0.3.10"
},
"devDependencies": {
"benchmark": "2.1.0",
"eslint": "2.7.0",
"json-loader": "0.5.4",
"tap": "5.7.1",

View file

@ -39,7 +39,7 @@ module.exports = function (e) {
obj.fields = extract(parseDOM(e.xml.innerHTML));
return obj;
}
};
/**
* Extracts fields from a block's innerHTML.

View file

@ -11,9 +11,6 @@ function Runtime () {
// State
this.blocks = {};
this.stacks = [];
window._BLOCKS = this.blocks;
window._STACKS = this.stacks;
}
/**
@ -32,7 +29,7 @@ Runtime.prototype.createBlock = function (block) {
for (var y in shadows) {
var shadow = shadows[y];
this.blocks[shadow.id] = shadow;
};
}
}
// Push block id to stacks array. New blocks are always a stack even if only

View file

View file

@ -2,6 +2,11 @@ var test = require('tap').test;
var VirtualMachine = require('../../src/index');
test('spec', function (t) {
var vm = new VirtualMachine();
t.type(VirtualMachine, 'function');
t.type(vm, 'object');
t.type(vm.blockListener, 'function');
t.end();
});

View file

@ -1,11 +0,0 @@
var test = require('tap').test;
var VirtualMachine = require('../../src/index');
test('spec', function (t) {
var vm = new VirtualMachine();
t.type(VirtualMachine, 'function');
t.type(vm, 'object');
t.type(vm.blockListener, 'function');
t.end();
});

View file

@ -25,7 +25,6 @@ test('time', function (t) {
test('start / stop', function (t) {
var timer = new Timer();
var start = timer.time();
var delay = 100;
var threshold = 1000 / 60; // 60 hz

7
vm.js
View file

@ -1168,9 +1168,6 @@
// State
this.blocks = {};
this.stacks = [];
window._BLOCKS = this.blocks;
window._STACKS = this.stacks;
}
/**
@ -1189,7 +1186,7 @@
for (var y in shadows) {
var shadow = shadows[y];
this.blocks[shadow.id] = shadow;
};
}
}
// Push block id to stacks array. New blocks are always a stack even if only
@ -1337,7 +1334,7 @@
obj.fields = extract(parseDOM(e.xml.innerHTML));
return obj;
}
};
/**
* Extracts fields from a block's innerHTML.

2
vm.min.js vendored

File diff suppressed because one or more lines are too long