I have written the code, fixed some issued with original code include the should-be-unchanged
const mflix = client.db(process.env.MFLIX_NS)
to seemed-to-work code
const mflix = client.db("sample_mflix")
When I ran node src/migrations/movie-last-updated-migration.js
I received the result
Found 23539 documents to update
23539 documents updated
But when I run the test case the test just run
> server@1.0.0 test F:\Coding\Front-End\JavaScript\nodejs\mongodb\mongodb-for-nodejs
> jest --passWithNoTests "migration"
Determining test suites to run...Setup Mongo Connection
RUNS test/migration.test.js
And then just hanging for more than 30 minutes. Even after I stop the server, close the command line and run again, still same result with the test. Also, when I go to status page, in the Migration section I got the message
Migration: It does not appear that you correctly converted the type
So what is the possible error of my code?
P.S: Even after I copy the solution with changing only the host to my cluster URI, I still get same error message