Merge pull request #17175 from is-a-dev/wdhdev-patch-2

feat(ci): url records should not reference themselves
This commit is contained in:
William Harrison
2024-11-14 13:51:44 +11:00
committed by GitHub
+20
View File
@@ -220,6 +220,26 @@ t("All files should have valid record values", (t) => {
if (key === "URL") {
t.notThrows(() => new URL(value), `${file}: Record value should be a valid URL for ${key}`);
if(file === "@.json") {
t.false(
value === "http://is-a.dev",
`${file}: Record value should not reference itself for ${key}`
);
t.false(
value === "https://is-a.dev",
`${file}: Record value should not reference itself for ${key}`
);
} else {
t.false(
value === "http://" + file.replace(/\.json$/, "") + ".is-a.dev",
`${file}: Record value should not reference itself for ${key}`
);
t.false(
value === "https://" + file.replace(/\.json$/, "") + ".is-a.dev",
`${file}: Record value should not reference itself for ${key}`
);
}
}
}