test: tighten discord owner allowlist assertion

This commit is contained in:
Shakker
2026-05-08 17:02:36 +01:00
parent 415958ec08
commit f193efbcd3

View File

@@ -269,7 +269,11 @@ describe("discord allowlist helpers", () => {
allowFrom: ["*", "user:123"],
sender: { id: "123" },
});
expect(explicitOwner.ownerAllowList).not.toBeNull();
if (explicitOwner.ownerAllowList === null) {
throw new Error("Expected explicit owner allowlist");
}
expect(explicitOwner.ownerAllowList.allowAll).toBe(false);
expect(explicitOwner.ownerAllowList.ids).toEqual(new Set(["123"]));
expect(explicitOwner.ownerAllowed).toBe(true);
});
});