Update tests/records.test.js

Co-authored-by: William Harrison <87287585+wdhdev@users.noreply.github.com>
This commit is contained in:
JonandWilliam Harrison authored and GitHub committed 2024-11-16 15:39:19 -05:00
1 parent 086eb7e34b
commit ad4f600421
1 file changed
+4 -4
+4 -4
View File
@@ -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}`);
}
}
});