Thanks for the response, here is the full messages from the test
> jest --passWithNoTests “get-comments”
Determining test suites to run…Setup Mongo Connection
_ FAIL test/get-comments.test.js_
_ Get Comments_
_ × Can fetch comments for a movie (99ms)_
_ × comments should be sorted by date (87ms)_
_ ● Get Comments › Can fetch comments for a movie_
_ TypeError: Cannot read property ‘length’ of undefined_
_ 10 | const movie = await MoviesDAO.getMovieByID(id)_
_ 11 | expect(movie.title).toEqual(“Once Upon a Time in Mexico”)_
_ > 12 | expect(movie.comments.length).toBe(2)_
_ | ^_
_ 13 | })_
_ 14 |_
_ 15 | test(“comments should be sorted by date”, async () => {_
_ at length (test/get-comments.test.js:12:27)_
_ at tryCatch (node_modules/regenerator-runtime/runtime.js:62:40)_
_ at Generator.invoke [as invoke] (node_modules/regenerator-runtime/runtime.js:296:22)
_ at Generator.prototype.(anonymous function) [as next] (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_
_ ● Get Comments › comments should be sorted by date_
_ TypeError: Cannot read property ‘slice’ of undefined_
_ 30 | const movie = await MoviesDAO.getMovieByID(id)_
_ 31 | const comments = movie.comments_
_ > 32 | const sortedComments = comments.slice()_
_ | ^_
_ 33 | sortedComments.sort((a, b) => b.date.getTime() - a.date.getTime())_
_ 34 |_
_ 35 | for (let i = 0; i < Math.min(10, comments.length); i++) {_
_ at slice (test/get-comments.test.js:32:39)_
_ at tryCatch (node_modules/regenerator-runtime/runtime.js:62:40)_
_ at Generator.invoke [as invoke] (node_modules/regenerator-runtime/runtime.js:296:22)
_ at Generator.prototype.(anonymous function) [as next] (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_
_ ● Get Comments › comments should be sorted by date_
_ expect.assertions(24)_
_ Expected 24 assertions to be called but received zero assertion calls._
_ 15 | test(“comments should be sorted by date”, async () => {_
_ 16 | // most recent to least_
_ > 17 | expect.assertions(24)_
_ | ^_
_ 18 | const movieIds = [_
_ 19 | “573a1391f29313caabcd8414”,_
_ 20 | “573a1391f29313caabcd9058”,_
_ at assertions (test/get-comments.test.js:17:12)_
_ at tryCatch (node_modules/regenerator-runtime/runtime.js:62:40)_
_ at Generator.invoke [as invoke] (node_modules/regenerator-runtime/runtime.js:296:22)
_ at Generator.prototype.(anonymous function) [as next] (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:35:14_
_ at new F (node_modules/babel-runtime/node_modules/core-js/library/modules/export.js:36:28)
_ at Object. (node_modules/babel-runtime/helpers/asyncToGenerator.js:14:12)_
Test Suites: 1 failed, 1 total
Tests: 2 failed, 2 total