Begin testing with mocha and chai.

This commit is contained in:
mmcw-dev 2019-04-15 13:07:47 -04:00
parent 7a52bc7c6e
commit dac70a122f
6 changed files with 958 additions and 3 deletions

4
.gitignore vendored
View File

@ -1,4 +1,6 @@
*.DS_Store *.DS_Store
dist/ .AppleDouble
*.Parent *.Parent
node_modules node_modules
dist

View File

@ -86,10 +86,19 @@ cam.listen = function () {
}; };
cam.second = {}; cam.second = {};
cam.second.enabled = false;
cam.second.queue = {}; cam.second.queue = {};
cam.second.lock = false; cam.second.lock = false;
cam.second.id = 'camera_second'; cam.second.id = 'camera_second';
cam.second.pos = 0; cam.second.pos = 0;
cam.second.dir = true; cam.second.dir = true;
cam.second.enable = function () {
cam.second.enabled = true;
}
cam.second.disable = function () {
cam.second.enabled = false;
}
module.exports = cam; module.exports = cam;

View File

@ -86,10 +86,20 @@ proj.setValue = function (val) {
}; };
proj.second = {}; proj.second = {};
proj.second.enabled = false;
proj.second.queue = {}; proj.second.queue = {};
proj.second.lock = false; proj.second.lock = false;
proj.second.id = 'projector_second'; proj.second.id = 'projector_second';
proj.second.dir = true; proj.second.dir = true;
proj.second.pos = 0; proj.second.pos = 0;
proj.second.enable = function () {
proj.second.enabled = true;
}
proj.second.disable = function () {
proj.second.disabled = true;
}
module.exports = proj; module.exports = proj;

11
lib/system/package.json Normal file
View File

@ -0,0 +1,11 @@
{
"name": "system",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}

905
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@
"lib": "lib" "lib": "lib"
}, },
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "sh ./scripts/tests.sh",
"docs": "sh ./scripts/docs.sh", "docs": "sh ./scripts/docs.sh",
"build": "sh ./scripts/build.sh", "build": "sh ./scripts/build.sh",
"patch": "sh ./scripts/version.sh patch", "patch": "sh ./scripts/version.sh patch",
@ -28,7 +28,25 @@
"@types/electron": "^1.6.10", "@types/electron": "^1.6.10",
"@types/node": "^11.10.4", "@types/node": "^11.10.4",
"@types/uuid": "^3.4.4", "@types/uuid": "^3.4.4",
"chai": "^4.2.0",
"jsdoc-to-markdown": "^4.0.1", "jsdoc-to-markdown": "^4.0.1",
"mocha": "^6.1.3",
"typescript": "^3.3.3333" "typescript": "^3.3.3333"
},
"dependencies" : {
"arduino": "file:lib/arduino",
"cam": "file:lib/cam",
"cmd": "file:lib/cmd",
"delay": "file:lib/delay",
"devices": "file:lib/devices",
"digital": "file:lib/digital",
"display": "file:lib/display",
"light": "file:lib/light",
"log": "file:lib/log",
"mscript": "file:lib/mscript",
"proj": "file:lib/proj",
"sequencer": "file:lib/sequencer",
"settings": "file:lib/settings",
"system": "file:lib/system"
} }
} }