M220JS - Ticket: Timeouts

I have populated te URI as the problem described, but i have an error and i can’t solve it.

MFLIX_DB_URI=mongodb+srv://m220student:m220password@cluster0.g4vwz.mongodb.net/test/?poolSize=50&w=majority&wtimeout=2500

Also i tried with wtimeoutMS with the same result.

This is the error produced:

 ● Timeouts › Timeout is set to 2500 milliseconds

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

    Expected: 2500
    Received: undefined

       8 |   test("Timeout is set to 2500 milliseconds", async () => {
       9 |     const { wtimeout } = await MoviesDAO.getConfiguration()
    > 10 |     expect(wtimeout).toBe(2500)
         |                      ^
      11 |   })
      12 | })
      13 | 

      at toBe (test/timeouts.test.js:10:22)
      at tryCatch (node_modules/regenerator-runtime/runtime.js:45:40)
      at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:271:22)      
      at Generator.prototype.<computed> [as next] (node_modules/regenerator-runtime/runtime.js:97:21)
      at asyncGeneratorStep (node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)       
      at _next (node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)

Can you help me?

Are you able to connect from shell with your URI string?

There should not be / after test

With that parameters no. But i followed the documentation… I am lost

Solved. It works now