Skip to content

Commit

Permalink
Fix test and restore route alias
Browse files Browse the repository at this point in the history
  • Loading branch information
feugy committed Dec 11, 2017
1 parent d22ffe8 commit 772fb38
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if (process.env.NODE_ENV !== 'production') {

// define routes
app.route('/', views.competitions)
// app.route('/competitions', views.competitions)
app.route('/competitions', views.competitions)
app.route('/competition/:id', views.competitionDetails)
app.route('/*', views['404'])

Expand Down
2 changes: 1 addition & 1 deletion client/test/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ test('should timeout be asynchronous', async t => {
test('should timeout run after N milliseconds', async t => {
const start = performance.now()
await timeout(10)
t.true(performance.now() - start >= 10)
t.true(performance.now() - start >= 9)
})
5 changes: 4 additions & 1 deletion server/lib/models/competition.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ module.exports = class Competition {
* @returns a plain JSON representation of this competition
*/
toJSON () {
return Object.assign({}, this, {date: this.date.toDate()})
return {
...this,
date: this.date.toDate()
}
}
}

0 comments on commit 772fb38

Please sign in to comment.