Bug in Chapter 2: User-Facing Backend Ticket: Paging

Test Suites: 1 failed, 1 total
Tests: 1 failed, 2 passed, 3 total
Snapshots: 0 total

But then I went to generate status code and surprisingly It generated. What the heck Is this?
I wasted a day . @kanikasingla

Post the complete log - I passed the ticket without any errors, however - there are some errors which don’t necessarily impact the results which is why the status code is generated. One needs to see the complete log to see where you went wrong.

Please share the complete log, what is the error, which test failed. Maybe it can help us improvise the code for all. :slight_smile:



1 Like

my test failed but still I get the status. Don’t know where is problem
may be in my code or in test or in generating status
but something is going wrong

I got 17904 records as well when I am using this filter: { genres: { $in: ["Comedy", "Drama"] } }. I am working on correcting the unit test.
Are you able to get validation code from STATUS page?


I encountered the same as classmate Best_Scene_Of too.
Screen pasted at below. And I can get the correct status code too.

Hi @CF_Chow,

The issue has been resolved from our end :slight_smile: We updated the unit test.


Hello Kanika

const totalNumMovies = page === 0 ? await movies.countDocuments(query) : 0

When we make the call for the second page in the paging test for genre, the dao code should update the total num of movies to 0 as the the ternary expressions specifies the check for page 0. can you please explain it ?