Skip to content

Commit

Permalink
add minimal test
Browse files Browse the repository at this point in the history
- update travis.yml
- add package.json
- add dummy test script

This test should run properly and travis build should now
pass (hopefully!)
  • Loading branch information
titaniumbones committed Oct 25, 2017
1 parent a3d43ed commit 6794289
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
language: node_js

node_js:
- "node"
- "8"

27 changes: 27 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "web-skills-intro-assignment",
"version": "1.0.0",
"description": "An assignment for Digital History at University of Toronto. Tests basic Javascript skills.",
"main": "index.js",
"scripts": {
"test": "mocha"
},
"repository": {
"type": "git",
"url": "git+https://github.com/titaniumbones/assignment-web-skills-intro.git"
},
"keywords": [
"javascript",
"assignment"
],
"author": "Matt Price",
"license": "GPL-3.0",
"bugs": {
"url": "https://github.com/titaniumbones/assignment-web-skills-intro/issues"
},
"homepage": "https://github.com/titaniumbones/assignment-web-skills-intro#readme",
"dependencies": {
"chai": "^4.1.2",
"mocha": "^4.0.1"
}
}
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 6794289

Please sign in to comment.