Update script to function as a class

This commit is contained in:
mmcw-dev 2018-06-16 18:49:48 -04:00
parent 4565205aad
commit e3b735ced3
1 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,7 @@
'use strict';
const mscript = require('../lib/mscript');
const Mscript = require('../lib/mscript');
const mscript = new Mscript();
QUnit.test(`Basic functions`, (assert) => {
const script1 = 'CF\nPF\nCB\nPB\nBF\nBB';
@ -93,7 +94,7 @@ QUnit.test('Loop', (assert) => {
&& obj.proj === 8
&& obj.arr.length === 16
&& obj.light.length === 16
&& obj.light[0] === mscript.black) {
&& obj.light[0] === '0,0,0') {
pass = true;
}
assert.ok(pass, 'Basic cam/proj loop');
@ -128,7 +129,7 @@ QUnit.test('Light', (assert) => {
&& obj.light.length === 3
&& obj.light[0] === '255,255,255'
&& obj.light[1] === ''
&& obj.light[2] === mscript.black) {
&& obj.light[2] === '0,0,0') {
pass = true;
}
assert.ok(pass, 'Basic black');