Skip to content

Commit 2d5b10a

Browse files
committed
✅ e2e: add card provisioning mocking
1 parent 62102c9 commit 2d5b10a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

server/test/e2e.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ vi.mock("../utils/panda", async (importOriginal: () => Promise<typeof panda>) =>
8686
}),
8787
getCard: vi.fn().mockImplementation((cardId: string) => Promise.resolve(cards.get(cardId))),
8888
getPIN: vi.fn().mockResolvedValue({ pin: null }),
89+
getProcessorDetails: vi
90+
.fn()
91+
.mockImplementation((cardId: string) =>
92+
Promise.resolve({ processorCardId: `proc_${cardId}`, timeBasedSecret: `secret_${cardId}` }),
93+
),
8994
getSecrets: vi.fn().mockImplementation((_cardId: string, sessionId: string) => {
9095
const privateKey = process.env.PANDA_E2E_PRIVATE_KEY;
9196
if (!privateKey) throw new Error("PANDA_E2E_PRIVATE_KEY not set");

0 commit comments

Comments
 (0)