I have followed all the instructions but always I have the same Error:
PS C:\Users\pablo\Desktop\mflix-js> npm test -t db-connection
server@1.0.0 test
jest --passWithNoTests “db-connection”
Determining test suites to run…Setup Mongo Connection
FAIL test/db-connection.test.js
● Test suite failed to run
TypeError: Cannot read properties of undefined (reading 'close')
17 |
18 | async teardown() {
> 19 | await this.global.mflixClient.close()
| ^
20 | await super.teardown()
21 | }
22 |
at MongoEnvironment.teardown (test/config/mongoEnvironment.js:19:35)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 38.7s
Ran all test suites matching /db-connection/i.
Teardown Mongo Connection
(node:5648) Warning: Accessing non-existent property ‘count’ of module exports inside circular dependency
(Use node --trace-warnings ...
to show where the warning was created)
(node:5648) Warning: Accessing non-existent property ‘findOne’ of module exports inside circular dependency
(node:5648) Warning: Accessing non-existent property ‘remove’ of module exports inside circular dependency
(node:5648) Warning: Accessing non-existent property ‘updateOne’ of module exports inside circular dependency
I´m doing it on visual studio
I have retried to make all the process thre times and always got the same
Some explanation: I´m doing this course using my first Atlas cluster from the Mongo Basic course, because when I try to make another new All of hte was of payment. Also I have already installed node.