test: fix readonly typing regressions in check baseline

This commit is contained in:
Brian Mendonca
2026-02-21 15:11:56 -07:00
committed by Peter Steinberger
parent 0e1aa77928
commit c7c047287e
5 changed files with 39 additions and 16 deletions

View File

@@ -724,9 +724,13 @@ describe("discord reaction notification gating", () => {
] as const;
for (const testCase of cases) {
expect(shouldEmitDiscordReactionNotification(testCase.input), testCase.name).toBe(
testCase.expected,
);
expect(
shouldEmitDiscordReactionNotification({
...testCase.input,
allowlist: testCase.input.allowlist ? [...testCase.input.allowlist] : undefined,
}),
testCase.name,
).toBe(testCase.expected);
}
});
});
@@ -1040,7 +1044,7 @@ describe("discord reaction notification modes", () => {
const guildEntries = makeEntries({
[guildId]: {
reactionNotifications: testCase.reactionNotifications,
users: testCase.users,
users: testCase.users ? [...testCase.users] : undefined,
},
});
const listener = new DiscordReactionListener(makeReactionListenerParams({ guildEntries }));