mirror of
https://github.com/ItsVipra/ProToots
synced 2024-11-21 19:13:03 +00:00
Add tests for wrong matches
This commit is contained in:
parent
e3ae217f46
commit
0240489456
1 changed files with 12 additions and 0 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue