mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-08-23 22:26:56 +00:00
feat(ci): subdomains on the root no underscores
This commit is contained in:
@@ -127,3 +127,17 @@ t("Reserved domains file should be valid", (t) => {
|
||||
|
||||
t.pass();
|
||||
});
|
||||
|
||||
const exceptedDomains = require("../util/excepted-domains.json");
|
||||
|
||||
t("Subdomains on the root should not start with an underscore", (t) => {
|
||||
for (const file of files) {
|
||||
const subdomain = file.replace(/\.json$/, "");
|
||||
|
||||
if (subdomain.split(".").length === 1 && !exceptedDomains.includes(subdomain)) {
|
||||
t.true(subdomain[0] !== "_", `${file}: Root subdomains should not start with an underscore`);
|
||||
}
|
||||
}
|
||||
|
||||
t.pass();
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user