Ticket: Migration - test case

Hi, I updated the host with the required URI and still I am getting the following error while running test case:

● Migration › migration

expect(received).not.toBeNull()

Received: null

  17 |     })
  18 |
> 19 |     expect(movie).not.toBeNull()
     |                       ^
  20 |   })
  21 | })
  22 |


Can anyone please help me out ?

There is probably more text around this message. What you share is insufficient for us to help you.

Hi, sorry updated my comment. This above message is what I get whenever I am running the test.

Do you actually ran the migration script?
How did you modify it (if you did it)? Probably that’s the missing part :wink:

Hi, thanks for the help :slight_smile: I had issues in my Migration script (BulkWrite statement) and once I fixed it, everything worked.

2 Likes

All,
My test still fails with the same error above after running the migration script.

I ran the migration script for this ticket. I get the following message:
Found 0 documents to update
No documents to update

On analyzing the documents in my movies collection, the lastUpdated timestamps are indeed parsed to a date type.

Any idea where the error is?

Sorry Kindly ignore this post. I had a typo: the lastupdated field in my predicate was misspelled as lastUpdated. As a result, running the script could not find any documents to update with lastUpdated. This was not supposed to be changed I understand, but I had to play around with the code to see where I went wrong.

Also, I think lastupdated should follow a camelCase convention when declaring such fields!

2 Likes