mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-05-26 10:00:32 +00:00
Merge pull request #17175 from is-a-dev/wdhdev-patch-2
feat(ci): url records should not reference themselves
This commit is contained in:
@@ -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}`
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user