diff --git a/gameservice/game-service.test.js b/gameservice/game-service.test.js index beb77164..e58c6dfe 100644 --- a/gameservice/game-service.test.js +++ b/gameservice/game-service.test.js @@ -9,11 +9,9 @@ beforeAll(async () => { mongoServer = await MongoMemoryServer.create(); const mongoUri = mongoServer.getUri(); process.env.MONGODB_URI = mongoUri; - mongoose.connect(mongoUri); }); afterAll(async () => { - await mongoose.disconnect(); await mongoServer.stop(); }); diff --git a/questionservice/question-service.test.js b/questionservice/question-service.test.js index e85317ca..f065840f 100644 --- a/questionservice/question-service.test.js +++ b/questionservice/question-service.test.js @@ -1,6 +1,5 @@ const request = require('supertest'); const { MongoMemoryServer } = require('mongodb-memory-server'); -const mongoose = require('mongoose'); const app = require('./question-service'); let mongoServer; @@ -9,11 +8,9 @@ beforeAll(async () => { mongoServer = await MongoMemoryServer.create(); const mongoUri = mongoServer.getUri(); process.env.MONGODB_URI = mongoUri; - mongoose.connect(mongoUri); }); afterAll(async () => { - await mongoose.disconnect(); await mongoServer.stop(); });