Greetings, I am having difficulty completing this ticket. The tests do not pass and the validation on the localhost page says “Migration: It does not appear that you correctly converted the type”
When I check the data manually in Compass it shows that the line for lastupdated has been converted from String to Double, or to Date but not an ISODate. I have tried this several ways.
Please let me know if anyone as any thoughts, as this is the final exercise for this chapter, due in 2 days. I have read every other Topic I can find here and tried everything I have seen already. Many thanks!
update: {
$set: { lastupdated: Date.parse(lastupdated) },
}
The error I am getting is as follows:
FAIL test/migration.test.js
Migration
✕ migration (66ms)
● Migration › migration
expect(received).not.toBeNull()
Received: null
13 | })
14 | console.log("movie: ", movie);
> 15 | expect(movie).not.toBeNull()
| ^
16 | })
17 | })
18 |
at toBeNull (test/migration.test.js:15:23)
at tryCatch (node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:296:22)
at Generator.prototype.(anonymous function) [as next] (node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:114:21)
at step (node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
console.log test/migration.test.js:14
movie: null