Update records.test.js

This commit is contained in:
William Harrison authored and GitHub committed 2025-10-24 19:22:23 +08:00
1 parent 408a96c308
commit 4b11a80d20
1 file changed
+6 -3
+6 -3
View File
@@ -288,9 +288,12 @@ t("All files should have valid records", (t) => {
});
// Record type combinations validation
if (recordKeys.includes("CNAME") && !data.proxied) {
t.is(recordKeys.length, 1, `${file}: CNAME records cannot be combined with other records unless proxied`);
t.true(!recordKeys.includes("A") && !recordKeys.includes("AAAA"), `${file}: CNAME records cannot be combined with A or AAAA records`);
if (recordKeys.includes("CNAME")) {
if (!data.proxied) {
t.is(recordKeys.length, 1, `${file}: CNAME records cannot be combined with other records unless proxied`);
} else {
t.true(!recordKeys.includes("A") && !recordKeys.includes("AAAA"), `${file}: CNAME records cannot be combined with A or AAAA records`);
}
}
if (recordKeys.includes("NS")) {
t.true(