Closed WarutereD closed 9 months ago
Running yarn test on a boilerplate server results in
Test Suites: 3 failed, 4 passed, 7 total Tests: 89 failed, 24 passed, 113 total Snapshots: 0 total Time: 40.157 s, estimated 60 s Ran all test suites.
Found the issue to be due to changes in MongoDB Node.js Drivers Fix: in src/config/config.js Update mongoose connection code to mongoose: { url: envVars.MONGODB_URL + (envVars.NODE_ENV === 'test' ? '-test' : ''), options: { useCreateIndex: true, useNewUrlParser: true, useUnifiedTopology: true, writeConcern: { w: 'majority', }, }, },
Running yarn test on a boilerplate server results in
Test Suites: 3 failed, 4 passed, 7 total Tests: 89 failed, 24 passed, 113 total Snapshots: 0 total Time: 40.157 s, estimated 60 s Ran all test suites.
Found the issue to be due to changes in MongoDB Node.js Drivers Fix: in src/config/config.js Update mongoose connection code to mongoose: { url: envVars.MONGODB_URL + (envVars.NODE_ENV === 'test' ? '-test' : ''), options: { useCreateIndex: true, useNewUrlParser: true, useUnifiedTopology: true, writeConcern: { w: 'majority', }, }, },