Skip to content

Commit

Permalink
fix: fixed paginate method signature
Browse files Browse the repository at this point in the history
  • Loading branch information
othergabs committed Apr 12, 2021
1 parent 3ee6465 commit 9046f35
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 2 deletions.
2 changes: 1 addition & 1 deletion challenges/5/challenge.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@

const posts = require('./posts.json')

const paginate = (pageNumber, itemsPerPage) => {}
const paginate = (collection, pageNumber = 1, itemsPerPage = 10) => {}

module.exports = paginate
1 change: 1 addition & 0 deletions challenges/5/challenge.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const expect = require('chai').expect
const paginate = require('./challenge')

describe('Challenge 5', () => {
Expand Down
53 changes: 53 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"test:challenge:6": "jest -t 'Challenge 6'"
},
"devDependencies": {
"jest": "^24.9.0"
"chai": "4.3.4",
"jest": "24.9.0"
}
}

0 comments on commit 9046f35

Please sign in to comment.