Add tests for wrong matches

This commit is contained in:
nachtjasmin 2023-07-16 11:17:23 +02:00 committed by Jasmin
parent e3ae217f46
commit 0240489456

View file

@ -11,6 +11,7 @@ const validFields = [
"pronomen",
"Pronouns / Pronomen",
];
const invalidFields = ["pronounciation"];
for (const field of validFields) {
extract(`${field} is extracted`, async () => {
@ -23,6 +24,17 @@ for (const field of validFields) {
});
}
for (const field of invalidFields) {
extract(`${field} is not extracted`, async () => {
const result = await pronouns.extractFromStatus({
account: {
fields: [{ name: field, value: "pro/nouns" }],
},
});
assert.equal(result, null);
});
}
extract.run();
const valueExtractionSuite = suite("value extraction");