fix: handle multi-level public suffixes in RDAP lookup (#6752)

This commit is contained in:
Joseph Adams
2026-01-17 13:18:25 +01:00
committed by GitHub
parent 324404f780
commit 81ae0af7e1
2 changed files with 23 additions and 7 deletions

View File

@@ -157,6 +157,17 @@ describe("Domain Expiry", () => {
assert.strictEqual(supportInfo.tld, "com");
});
test("supports multi-level public suffix via RDAP fallback (e.g. com.br)", async () => {
const monitor = {
type: "http",
url: "https://record.com.br",
domainExpiryNotification: true,
};
const supportInfo = await DomainExpiry.checkSupport(monitor);
assert.strictEqual(supportInfo.domain, "record.com.br");
assert.strictEqual(supportInfo.tld, "br");
});
test("handles complex subdomain correctly", async () => {
const monitor = {
type: "http",