Skip to content

Commit

Permalink
Add tests for wrong matches
Browse files Browse the repository at this point in the history
  • Loading branch information
nachtjasmin committed Jul 16, 2023
1 parent e3ae217 commit 0240489
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/extractPronouns.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const validFields = [
"pronomen",
"Pronouns / Pronomen",
];
const invalidFields = ["pronounciation"];

for (const field of validFields) {
extract(`${field} is extracted`, async () => {
Expand All @@ -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");
Expand Down

0 comments on commit 0240489

Please sign in to comment.