diff --git a/bin/_coverage b/bin/_coverage new file mode 100755 index 0000000..e082483 --- /dev/null +++ b/bin/_coverage @@ -0,0 +1,21 @@ +#!/bin/sh + +if [ $(which jscoverage) ] +then + echo "Running test coverage..." + rm -rf ./zetta-runtime-HEAD + rm -rf ./zetta-runtime-jscoverage + git archive --format=tar --prefix=zetta-runtime-HEAD/ HEAD | tar x + jscoverage --exclude=node_modules ./zetta-runtime-HEAD ./zetta-runtime-jscoverage + cd ./zetta-runtime-jscoverage/ + npm install + mocha --reporter html-cov > coverage.html + open coverage.html +else + echo "jscoverage is not installed" + echo "if on OS X:" + echo " use brew install jscoverage" + echo "if on linux:" + echo " use sudo apt-get install jscoverage" +fi + diff --git a/device.js b/device.js new file mode 100644 index 0000000..a08298f --- /dev/null +++ b/device.js @@ -0,0 +1,6 @@ +var uuid = require('node-uuid'); + +var Device = module.exports = function(){ + this.id = uuid.v4(); +}; + diff --git a/test/test.js b/test/test.js new file mode 100644 index 0000000..5decd66 --- /dev/null +++ b/test/test.js @@ -0,0 +1,7 @@ +var assert = require('assert'); + +describe('Hello', function() { + it('should be fine. 1==1', function() { + assert.equal(1, 1); + }); +});