From e3b735ced3166636ef55432bd0e91fe9799d536e Mon Sep 17 00:00:00 2001 From: mmcw-dev Date: Sat, 16 Jun 2018 18:49:48 -0400 Subject: [PATCH] Update script to function as a class --- app/test/mscript_test.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/test/mscript_test.js b/app/test/mscript_test.js index 325b148..749f026 100644 --- a/app/test/mscript_test.js +++ b/app/test/mscript_test.js @@ -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');