mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-10-13 08:15:41 +00:00
feat(ci): url records should not reference themselves
This commit is contained in:
1 parent
0b77e2ae75
commit
b549766709
1 file changed
+20
@@ -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