Skip to content
This repository has been archived by the owner on Sep 18, 2019. It is now read-only.

set up first test #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const routes = require('./routes')

const index = require('./routes/index')
const hello = require('./routes/hello');

// Connect routes to application
app.use('/', index);
app.use('/hello', hello);
Expand All @@ -13,7 +14,13 @@ app.get('/', (req, res) => {
res.send('<h1>I love consensus!</h1>')
})

// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'pug');

// Turn on server!
app.listen(3000, () => {
console.log('The application is listening on port 3000')
})

module.exports = app;
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "app.js",
"scripts": {
"styletest": "standard",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "mocha"
},
"keywords": [],
"author": "",
Expand All @@ -15,6 +15,7 @@
"pug": "^2.0.0-rc.4"
},
"devDependencies": {
"mocha": "^4.0.1",
"standard": "^10.0.3"
}
}
File renamed without changes.
8 changes: 8 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
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));
});
});
});
File renamed without changes.