Skip to content

Commit 2f41e89

Browse files
fix: backend jest tests
1 parent 22ec954 commit 2f41e89

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

backend/.env.template

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Default environment variables for backend
22
NODE_ENV=development | test | production
3-
DATABASE_URL=postgres://udrqsibqpcuogc:34ddd112622a66b36d5cfcc1ffe30bf00d4c8f467182c83011dc2bb229001bcd@ec2-54-247-118-139.eu-west-1.compute.amazonaws.com:5432/d5vhr4cmga9ovc
3+
DATABASE_URL=postgres://mjyjycebwtvykx:db2bd984b4ca9cdbcf23f6a504923e13564c7d91e766f4e2cc0b6475a8128f10@ec2-63-34-97-163.eu-west-1.compute.amazonaws.com:5432/dd6maefvg27ehd

backend/packages/db/prisma/schema.prisma

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ model Post {
2222
published Boolean @default(false)
2323
title String
2424
author User? @relation(fields: [authorId], references: [id])
25-
}
25+
}

backend/tests/utils/index.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,13 @@ class TestSuiteUtils implements TestSuite {
4343
}
4444

4545
private setupJest = (): void => {
46-
jest.setTimeout(60000);
47-
global.afterAll(this.afterAll);
46+
jest.setTimeout(20_000);
47+
global.afterAll(done => {
48+
this.afterAll(done);
49+
});
4850
};
4951

50-
private afterAll = async (done: () => void): Promise<void> => {
52+
private afterAll = async (done: jest.DoneCallback) => {
5153
await this.cleanup();
5254
await this.prisma.$disconnect();
5355
done();

0 commit comments

Comments
 (0)