Ticket:Paging - passes with wrong logic

If I do const displayCursor = page === 0 ? cursor.limit(moviesPerPage) : cursor.skip(moviesPerPage).limit(moviesPerPage) all tests will pass since in test only second page is checked but this is wrong and should not pass.

Please do a fix.

1 Like

Can you provide mode détails on why it is wrong?

1 Like

The code I mentioned when you query for the 3rd page it will again skip the same number pages instead of page * moviesPerPage


Yes absolutely. I read too fast.

1 Like

Hi @Suman_Kumar_Mal, thank you for reporting this.
I have forwarded this to the appropriate team and please be rest assured that our team will release a fix as soon as possible.

In case you have any doubts, please feel free to reach out to us.

Thanks and Regards.
Sourabh Bagrecha,
Curriculum Services Engineer

1 Like