/mflix-js/src/dao/moviesDAO.js - line: 262
// TODO Ticket: Paging
// Use the cursor to only return the movies that belong on the current page
const displayCursor = cursor.limit(moviesPerPage).skip(page * moviesPerPage)
I added the skip method with (page * moviesPerPage), so it will be calculated with the params. the ‘cast’ and ‘text’ filters tests successfully passed, so I guess the problem is not at the code implement (let me know if I’m wrong).
when I get into the paging.test.js, I found that the test search for ‘Comedy’ and ‘Drama’ genres, maybe the sample data has been changed? also tried to delete all the sample data and to download it again - still got the same error. please help me with that.
console output >>>
Paging
✓ Supports paging by cast (1735ms)
✕ Supports paging by genre (641ms)
✓ Supports paging by text (744ms)
● Paging › Supports paging by genre
expect(received).toEqual(expected) // deep equality
Expected: 17903
Received: 23530