Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vrunoa committed Jul 8, 2015
1 parent 95dc28d commit 72938ba
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: node_js
node_js:
- "0.11"
- "0.10"
- iojs
- iojs-v1.0.2
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
"description": "Call adb methods from node",
"main": "bin/adbjs",
"scripts": {
"build" : "make clean && make node",
"example" : "npm run build && node ./example/index.js"
"build": "make clean && make node",
"example": "npm run build && node ./example/index.js",
"test": "node_modules/mocha/bin/mocha tests/* --compilers js:babel/register -t 15s --require mocha-clean"
},
"repository": {
"type": "git",
Expand All @@ -26,5 +27,10 @@
"homepage": "https://github.com/Urucas/adbjs",
"dependencies": {
"babel": "^5.1.13"
},
"devDependencies": {
"adb-mock": "0.0.1",
"mocha": "^2.2.5",
"mocha-clean": "^0.4.0"
}
}
14 changes: 14 additions & 0 deletions tests/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import ADB from '../lib/adb';

describe("ADB instance test", () => {

let adb = new ADB();

it("Test adb version", (done) => {
let version = adb.version();
if(!/Android Debug Bridge version [\d\.]+/.test(version)) throw new Error("returns wrong version:"+version);
done();
});

});

0 comments on commit 72938ba

Please sign in to comment.