Skip to content

Commit 92b8177

Browse files
committed
mock getLinkryKvArn
1 parent ae978ee commit 92b8177

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/unit/linkry.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { CloudFrontKeyValueStoreClient } from "@aws-sdk/client-cloudfront-keyval
1717

1818
import { secretJson, secretObject } from "./secret.testdata.js";
1919
import supertest from "supertest";
20+
import { environmentConfig } from "../../src/common/config.js";
2021

2122
const ddbMock = mockClient(DynamoDBClient);
2223
const smMock = mockClient(SecretsManagerClient);
@@ -30,6 +31,9 @@ vi.mock("../../src/api/functions/cloudfrontKvStore.js", async () => {
3031
setKey: vi.fn(),
3132
deleteKey: vi.fn(),
3233
getKey: vi.fn().mockResolvedValue("https://www.acm.illinois.edu"),
34+
getLinkryKvArn: vi
35+
.fn()
36+
.mockResolvedValue(environmentConfig["dev"].LinkryCloudfrontKvArn),
3337
};
3438
});
3539

0 commit comments

Comments
 (0)