-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added configuration for mocha tests. Added configuration for test cov…
…erage. Added a device base class.
- Loading branch information
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
var uuid = require('node-uuid'); | ||
|
||
var Device = module.exports = function(){ | ||
this.id = uuid.v4(); | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
var assert = require('assert'); | ||
|
||
describe('Hello', function() { | ||
it('should be fine. 1==1', function() { | ||
assert.equal(1, 1); | ||
}); | ||
}); |