Npm test -t projection or any test

hello guys, I have next problem, I don’t can run the test. npm throw the below error
but the last saturday, worked fine .

jest --passWithNoTests “projection”

Determining test suites to run…Setup Mongo Connection
FAIL test/projection.test.spec.js
● Test suite failed to run

TypeError: Cannot read property 'close' of undefined

  17 | 
  18 |   async teardown() {
> 19 |     await
     |                                   ^
  20 |     await super.teardown()
  21 |   }
  22 | 

  at MongoEnvironment.teardown (test/config/mongoEnvironment.js:19:35)
      at Generator.throw (<anonymous>)

Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 0.115s
Ran all test suites matching /projection/i.
Teardown Mongo Connection
npm ERR! Test failed. See above for more details.

Hi @caherdenez,

Please check your connection string and authentication parameters in .env file. Also, if by any chance you are working in office network that might also be blocking the request.


I got this error when my network connection dropped.

i removed the .env and create again, and work good