fix(server): flaky test (#4271)

This commit is contained in:
Alex Yang 2023-09-07 13:55:04 -07:00 committed by GitHub
parent bf3a3379ae
commit 4c4bb65be8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,7 @@ test.beforeEach(async () => {
const client = new PrismaClient(); const client = new PrismaClient();
await client.$connect(); await client.$connect();
await client.user.deleteMany({}); await client.user.deleteMany({});
await client.$disconnect();
}); });
test.beforeEach(async () => { test.beforeEach(async () => {

View File

@ -42,6 +42,7 @@ test.beforeEach(async () => {
test.afterEach(async () => { test.afterEach(async () => {
await app.close(); await app.close();
await m.close();
timer.restore(); timer.restore();
}); });

View File

@ -15,6 +15,7 @@ test.beforeEach(async () => {
const client = new PrismaClient(); const client = new PrismaClient();
await client.$connect(); await client.$connect();
await client.user.deleteMany({}); await client.user.deleteMany({});
await client.$disconnect();
}); });
test.beforeEach(async () => { test.beforeEach(async () => {