Update domains.test.js

Match how is-a.dev has theirs
This commit is contained in:
Jon authored and GitHub committed 2024-11-23 11:47:28 -05:00
1 parent 18251f9470
commit 82f8c2af53
1 file changed
+2 -2
+2 -2
View File
@@ -13,7 +13,7 @@ t("Nested subdomains should not exist without a parent subdomain", (t) => {
return; // Skip directories
}
const subdomain = file.replace(".json", "");
const subdomain = file.replace(/\.json$/, "");
if (subdomain.split(".").length > 1) {
// Get parent domain by removing the last part (subdomain) from the full subdomain
@@ -38,7 +38,7 @@ t("Nested subdomains should not exist if the parent subdomain has NS records", (
return; // Skip directories
}
const subdomain = file.replace(".json", "");
const subdomain = file.replace(/\.json$/, "");
if (subdomain.split(".").length > 1) {
// Get parent domain by removing the last part (subdomain) from the full subdomain