Skip to content

Commit e6ccb8d

Browse files
committed
✅ add test for anonymize key
1 parent b4373ee commit e6ccb8d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/util/anonymize-key.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ it("anonymizes valid key correctly", () => {
88

99
it("anonymizes empty key correctly", () => {
1010
const originalKey = "";
11-
const anonymizedKey = "***";
11+
const anonymizedKey = "UNKNOWN";
12+
expect(anonymizeKey(originalKey)).toEqual(anonymizedKey);
13+
});
14+
15+
it("anonymizes not-string key correctly", () => {
16+
const originalKey = {};
17+
const anonymizedKey = "UNKNOWN";
1218
expect(anonymizeKey(originalKey)).toEqual(anonymizedKey);
1319
});

0 commit comments

Comments
 (0)