Skip to content

Commit 3851ffd

Browse files
committed
fix platform mock
1 parent 5b7c729 commit 3851ffd

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

apps/webapp/test/engine/triggerTask.test.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ vi.mock("~/db.server", () => ({
55
prisma: {},
66
}));
77

8-
vi.mock("~/services/platform.v3.server", () => ({
9-
getEntitlement: vi.fn(),
10-
}));
8+
vi.mock("~/services/platform.v3.server", async (importOriginal) => {
9+
const actual = (await importOriginal()) as Record<string, unknown>;
10+
return {
11+
...actual,
12+
getEntitlement: vi.fn(),
13+
};
14+
});
1115

1216
import { RunEngine } from "@internal/run-engine";
1317
import { setupAuthenticatedEnvironment, setupBackgroundWorker } from "@internal/run-engine/tests";

0 commit comments

Comments
 (0)