Skip to content

Commit 53496a8

Browse files
committed
fix ses mock
1 parent 48d387e commit 53496a8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/unit/mobileWallet.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import { afterAll, expect, test, beforeEach, vi } from "vitest";
2-
import { secretObject } from "./secret.testdata.js";
32
import init from "../../src/api/index.js";
43
import { describe } from "node:test";
54
import { EntraFetchError } from "../../src/common/errors/index.js";
5+
import { mockClient } from "aws-sdk-client-mock";
66
import { issueAppleWalletMembershipCard } from "../../src/api/functions/mobileWallet.js";
7+
import { SendRawEmailCommand, SESClient } from "@aws-sdk/client-ses";
8+
9+
const sesMock = mockClient(SESClient);
710

811
vi.mock("../../src/api/functions/membership.js", () => {
912
return {
@@ -67,6 +70,7 @@ describe("Mobile wallet pass issuance", async () => {
6770
await response.json();
6871
});
6972
test("Test that passes will be issued for members", async () => {
73+
sesMock.on(SendRawEmailCommand).resolvesOnce({}).rejects();
7074
const response = await app.inject({
7175
method: "GET",
7276
url: "/api/v1/mobileWallet/[email protected]",

0 commit comments

Comments
 (0)