Skip to content

Commit

Permalink
Add test framework
Browse files Browse the repository at this point in the history
  • Loading branch information
Mukesh Munisubbanna committed Mar 15, 2017
1 parent a3a676f commit 4220a9d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ Run webpack
npm run-script webpack
```

Run tests

```bash
npm test
```


Run app

```bash
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"webpack": "webpack",
"start": "electron .",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "mocha"
},
"repository": {
"type": "git",
Expand All @@ -26,6 +26,7 @@
"babel-preset-react": "^6.23.0",
"css-loader": "^0.26.1",
"electron": "^1.4.15",
"mocha": "^3.2.0",
"style-loader": "^0.13.1",
"webpack": "^2.2.1"
},
Expand Down
9 changes: 9 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
var assert = require('assert');

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

0 comments on commit 4220a9d

Please sign in to comment.