Skip to content

Commit 936ed72

Browse files
authored
Merge branch 'main' into main
2 parents bb5d267 + 4b11a80 commit 936ed72

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

domains/kanxu.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"owner": {
3+
"username": "Rvtea"
4+
},
5+
"records": {
6+
"CNAME": "rvtea.github.io"
7+
}
8+
}

tests/records.test.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,12 @@ t("All files should have valid records", (t) => {
288288
});
289289

290290
// Record type combinations validation
291-
if (recordKeys.includes("CNAME") && !data.proxied) {
292-
t.is(recordKeys.length, 1, `${file}: CNAME records cannot be combined with other records unless proxied`);
293-
t.true(!recordKeys.includes("A") && !recordKeys.includes("AAAA"), `${file}: CNAME records cannot be combined with A or AAAA records`);
291+
if (recordKeys.includes("CNAME")) {
292+
if (!data.proxied) {
293+
t.is(recordKeys.length, 1, `${file}: CNAME records cannot be combined with other records unless proxied`);
294+
} else {
295+
t.true(!recordKeys.includes("A") && !recordKeys.includes("AAAA"), `${file}: CNAME records cannot be combined with A or AAAA records`);
296+
}
294297
}
295298
if (recordKeys.includes("NS")) {
296299
t.true(

0 commit comments

Comments
 (0)