4.8.11 test (#2843)

* feat: app version test

* update doc

* fix: paging num error

* fix: doc api domain

* rename variable

* perf: memment node min size
This commit is contained in:
Archer
2024-09-30 17:28:03 +08:00
committed by shilin66
parent df784b7369
commit e579d3fa1f
39 changed files with 427 additions and 179 deletions

View File

@@ -57,11 +57,25 @@ jest.mock('@/service/middleware/entry', () => {
});
beforeAll(async () => {
// 新建一个内存数据库,然后让 mongoose 连接这个数据库
if (!global.mongod || !global.mongodb) {
const mongod = await MongoMemoryServer.create();
global.mongod = mongod;
global.mongodb = mongoose;
await global.mongodb.connect(mongod.getUri());
await global.mongodb.connect(mongod.getUri(), {
bufferCommands: true,
maxConnecting: 50,
maxPoolSize: 50,
minPoolSize: 20,
connectTimeoutMS: 60000,
waitQueueTimeoutMS: 60000,
socketTimeoutMS: 60000,
maxIdleTimeMS: 300000,
retryWrites: true,
retryReads: true
});
await initMockData();
}
});