mirror of
https://github.com/ItsVipra/ProToots
synced 2025-02-16 12:38:23 +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",
|
"pronomen",
|
||||||
"Pronouns / Pronomen",
|
"Pronouns / Pronomen",
|
||||||
];
|
];
|
||||||
|
const invalidFields = ["pronounciation"];
|
||||||
|
|
||||||
for (const field of validFields) {
|
for (const field of validFields) {
|
||||||
extract(`${field} is extracted`, async () => {
|
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();
|
extract.run();
|
||||||
|
|
||||||
const valueExtractionSuite = suite("value extraction");
|
const valueExtractionSuite = suite("value extraction");
|
||||||
|
|
Loading…
Add table
Reference in a new issue