Update records.test.js

This commit is contained in:
Jon authored and GitHub committed 2024-11-14 15:15:58 -05:00
1 parent 4d90223963
commit a57c67fbe1
1 file changed
+4 -4
+4 -4
View File
@@ -267,17 +267,17 @@ t("All files should have valid record values", (t) => {
}
}
// TXT: string | string[]
// TXT: object | object[]
if (key === "TXT") {
if (Array.isArray(value)) {
value.forEach((record) => {
t.true(
typeof record === "string",
`${file}: Record value should be a string for ${key} at index ${value.indexOf(record)}`
typeof record === "object",
`${file}: Record value should be a object for ${key} at index ${value.indexOf(record)}`
);
});
} else {
t.true(typeof value === "string", `${file}: Record value should be a string for ${key}`);
t.true(typeof value === "object", `${file}: Record value should be a object for ${key}`);
}
}
});