Migration Ticket - test doesn't run or terminate, but validated


I was trying to figure out what was wrong with my code. I got to this point before several times:

cursor length: 23539 (added console log check)
Found 23539 documents to update
23539 documents updated

The database was not saving the type of lastupdated even if I cast it to Date in several ways. I tried reading a few guides in the forum about how to get it to work, something about:

  • removing the new from the outer Date constructor
  • fixing specific 'quote' issues in the predicate
  • closing out of other connections to the database (mongo shell, Compass)

I think somewhere along the line, I removed the new Date() part completely, and I think that’s where it got cast to double. I troubleshot the connection string specifics, as my code change to double did not find any results the first few times. Changing the database name back to sample_mflix did the trick, verified using Compass. I’ve never gotten positive output from the test itself after a long time, though, even though the test is literally just trying to find one document in the correct format and I can pass the validation test now after starting the app using npm start.

What ways can I troubleshoot the jest environment? I’d rather have it give feedback both ways instead of trying to yell at me only when I’m doing something wrong :laughing: thanks!

Same thing just happened again: I successfully completed the timeout ticket, but the test itself is hanging (which, based on previous experience, suggested that I probably did it correctly even if the test did not update). Any suggestions on how to deal with the testing issues? It successfully ran the connection pooling test.

Hi @Jessie_29564,

I was away last week for MongoDB Conference, were you able to resolve the issues? I can see that you can successfully passed the course.