From 0240489456afec3b3e6f11d2381cbc9fb6769cc5 Mon Sep 17 00:00:00 2001 From: nachtjasmin Date: Sun, 16 Jul 2023 11:17:23 +0200 Subject: [PATCH] Add tests for wrong matches --- tests/extractPronouns.spec.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/extractPronouns.spec.js b/tests/extractPronouns.spec.js index ab08d7f..bc1babf 100644 --- a/tests/extractPronouns.spec.js +++ b/tests/extractPronouns.spec.js @@ -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");