From 4f5582ebeacda26f462af4331e4f6e7965ca8618 Mon Sep 17 00:00:00 2001 From: iotux Date: Tue, 13 Jan 2026 14:50:02 +0100 Subject: [PATCH] Removed commented code --- test/backend-test/test-domain.js | 93 +------------------------------- 1 file changed, 1 insertion(+), 92 deletions(-) diff --git a/test/backend-test/test-domain.js b/test/backend-test/test-domain.js index 3b8c84c61..04d77d27c 100644 --- a/test/backend-test/test-domain.js +++ b/test/backend-test/test-domain.js @@ -96,61 +96,7 @@ describe("Domain Expiry", () => { }); describe("Domain Parsing", () => { - /* - test("throws error for invalid domain (no domain part)", async () => { - const monitor = { - type: "http", - url: "https://", - domainExpiryNotification: true, - }; - await assert.rejects( - async () => await DomainExpiry.checkSupport(monitor), - (error) => { - assert.strictEqual(error.constructor.name, "TranslatableError"); - assert.strictEqual(error.message, "domain_expiry_unsupported_invalid_domain"); - return true; - } - ); - }); - */ - - /* - test("throws error for IPv4 address instead of domain", async () => { - const monitor = { - type: "http", - url: "https://192.168.1.1", - domainExpiryNotification: true, - }; - await assert.rejects( - async () => await DomainExpiry.checkSupport(monitor), - (error) => { - assert.strictEqual(error.constructor.name, "TranslatableError"); - assert.strictEqual(error.message, "domain_expiry_unsupported_invalid_domain"); - return true; - } - ); - }); - */ - - /* - test("throws error for IPv6 address", async () => { - const monitor = { - type: "http", - url: "https://[2001:db8::1]", - domainExpiryNotification: true, - }; - await assert.rejects( - async () => await DomainExpiry.checkSupport(monitor), - (error) => { - assert.strictEqual(error.constructor.name, "TranslatableError"); - assert.strictEqual(error.message, "domain_expiry_unsupported_invalid_domain"); - return true; - } - ); - }); - */ - - test("throws error for non-ICANN TLD (e.g. .local)", async () => { + test("throws error for non-ICANN TLD (e.g. .local)", async () => { const monitor = { type: "http", url: "https://example.local", @@ -182,25 +128,6 @@ describe("Domain Expiry", () => { ); }); - /* - test("throws error for single-letter TLD", async () => { - const monitor = { - type: "http", - url: "https://example.x", - domainExpiryNotification: true, - }; - await assert.rejects( - async () => await DomainExpiry.checkSupport(monitor), - (error) => { - assert.strictEqual(error.constructor.name, "TranslatableError"); - assert.strictEqual(error.message, "domain_expiry_public_suffix_too_short"); - return true; - } - ); - }); - */ - }); - describe("Edge Cases & RDAP Support", () => { test("handles subdomain correctly", async () => { const monitor = { @@ -245,24 +172,6 @@ describe("Domain Expiry", () => { assert.strictEqual(supportInfo.domain, "example.com"); assert.strictEqual(supportInfo.tld, "com"); }); - - /* - test("throws error for unsupported TLD without RDAP endpoint", async () => { - const monitor = { - type: "http", - url: "https://example.localhost", - domainExpiryNotification: true, - }; - await assert.rejects( - async () => await DomainExpiry.checkSupport(monitor), - (error) => { - assert.strictEqual(error.constructor.name, "TranslatableError"); - assert.strictEqual(error.message, "domain_expiry_unsupported_unsupported_tld_no_rdap_endpoint"); - return true; - } - ); - }); - */ }); });