mirror of
https://github.com/tiennm99/open-domains.git
synced 2026-10-11 12:19:07 +00:00
Update tests/records.test.js
Co-authored-by: William Harrison <87287585+wdhdev@users.noreply.github.com>
This commit is contained in:
1 parent
086eb7e34b
commit
ad4f600421
1 file changed
+4
-4
@@ -267,17 +267,17 @@ t("All files should have valid record values", (t) => {
|
||||
}
|
||||
}
|
||||
|
||||
// TXT: object | object[]
|
||||
// TXT: string | string[]
|
||||
if (key === "TXT") {
|
||||
if (Array.isArray(value)) {
|
||||
value.forEach((record) => {
|
||||
t.true(
|
||||
typeof record === "object",
|
||||
`${file}: Record value should be a object for ${key} at index ${value.indexOf(record)}`
|
||||
typeof record === "string",
|
||||
`${file}: Record value should be a string for ${key} at index ${value.indexOf(record)}`
|
||||
);
|
||||
});
|
||||
} else {
|
||||
t.true(typeof value === "object", `${file}: Record value should be a object for ${key}`);
|
||||
t.true(typeof value === "string", `${file}: Record value should be a string for ${key}`);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user