mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-10-05 14:14:56 +00:00
chore: add tests to block "s-a-dev" in subdomain names
This commit is contained in:
1 parent
cbc860021c
commit
b84683beaf
1 file changed
+12
@@ -102,3 +102,15 @@ t("Users are limited to one single character subdomain", (t) => {
|
||||
|
||||
t.pass();
|
||||
});
|
||||
|
||||
t("Subdomain names should not contain 'is-a-dev'", (t) => {
|
||||
files.forEach((file) => {
|
||||
const subdomain = file.replace(/\.json$/, "");
|
||||
const baseName = subdomain.split(".").pop();
|
||||
|
||||
t.false(
|
||||
baseName.toLowerCase().includes("is-a-dev"),
|
||||
`${file}: Subdomain name cannot contain 'is-a-dev'`
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user