Skip to content

Commit 0d4d609

Browse files
committed
test: add mock for patch service in application.command.test.ts and application.real.test.ts
- Introduced a mock for the patch service's findMany method in both test files to simulate database behavior. - This change enhances test coverage and ensures consistency across the test suite.
1 parent f7079f5 commit 0d4d609

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

apps/dokploy/__test__/deploy/application.command.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ vi.mock("@dokploy/server/db", () => {
2828
applications: {
2929
findFirst: vi.fn(),
3030
},
31+
patch: {
32+
findMany: vi.fn().mockResolvedValue([]),
33+
},
3134
},
3235
},
3336
};

apps/dokploy/__test__/deploy/application.real.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ vi.mock("@dokploy/server/db", () => {
2929
applications: {
3030
findFirst: vi.fn(),
3131
},
32+
patch: {
33+
findMany: vi.fn().mockResolvedValue([]),
34+
},
3235
},
3336
},
3437
};

0 commit comments

Comments
 (0)