Shows test failed

FAIL test/db-connection.test.js
Connection
√ Can access MFlix data (43ms)
√ Can retrieve a movie by id (42ms)
× Can retrieve first page of movies (182ms)

● Connection › Can retrieve first page of movies

expect(received).toEqual(expected)

Expected value to equal:
  45993
Received:
  28000

  27 |     } = await MoviesDAO.getMovies()
  28 |     expect(firstPage.length).toEqual(20)
> 29 |     expect(numMovies).toEqual(45993)
     |                       ^
  30 |   })
  31 | })
  32 |

  at toEqual (test/db-connection.test.js:29:23)
  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

Test Suites: 1 failed, 1 total
Tests: 1 failed, 2 passed, 3 total
Snapshots: 0 total
Time: 2.484s, estimated 3s
Ran all test suites matching /db-connection/i.
Teardown Mongo Connection
npm ERR! Test failed. See above for more details.

i didnt get whats happning

Looks like the movies were not uploaded correctly to your cluster.

As the test case indicates, a movie count of 45993 is expected and the API returned 28000.

Determining test suites to run…Setup Mongo Connection
FAIL test/connection-pooling.test.js
Connection Pooling
× Connection pool size is 50 (47ms)

● Connection Pooling › Connection pool size is 50

expect(received).toBe(expected) // Object.is equality

Expected: 50
Received: undefined

Difference:

  Comparing two different types of values. Expected number but received undefined.

   8 |   test("Connection pool size is 50", async () => {
   9 |     const response = await MoviesDAO.getConfiguration()
> 10 |     expect(response.poolSize).toBe(50)
     |                               ^
  11 |   })
  12 | })
  13 |

  at toBe (test/connection-pooling.test.js:10:31)
  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

Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 2.477s, estimated 3s
Ran all test suites matching /connection-pooling/i.
Teardown Mongo Connection
npm ERR! Test failed. See above for more details.

is there any packages is missing or what

You are too early in the session to be running this test. Connection pool is Chapter 4. Please read the lab carefully. I think you should be running db-connection at this point.