Skip to content

Commit

Permalink
Added in Mocha tests. Still nothing real
Browse files Browse the repository at this point in the history
  • Loading branch information
sazzer committed Feb 2, 2016
1 parent 2a3f8c8 commit 595972f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ node_modules

# Optional REPL history
.node_repl_history
lib/
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
"description": "Module for writing fluent tests against a GraphQL API",
"main": "lib/main/index.js",
"scripts": {
"clean": "rm -rf lib",
"compile": "babel src/main -d lib/main",
"test": "npm run compile && echo \"Error: no test specified\" && exit 1"
"test-compile": "babel src/test -d lib/test",
"pretest-compile": "npm run compile",
"preunittest": "npm run test-compile",
"unittest": "mocha lib/test",
"test": "npm run unittest"
},
"repository": {
"type": "git",
Expand All @@ -23,6 +28,7 @@
"homepage": "https://github.com/sazzer/graphql-tester#readme",
"devDependencies": {
"babel-cli": "^6.4.5",
"babel-preset-es2015-node5": "^1.1.2"
"babel-preset-es2015-node5": "^1.1.2",
"mocha": "^2.4.5"
}
}
10 changes: 10 additions & 0 deletions src/test/simple.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import assert from 'assert';

describe('Array', () => {
describe('#indexOf()', () => {
it('should return -1 when the value is not present', () => {
assert.equal(-1, [1,2,3].indexOf(5));
assert.equal(-1, [1,2,3].indexOf(0));
});
});
});

0 comments on commit 595972f

Please sign in to comment.