aboutsummaryrefslogtreecommitdiff
path: root/test/deinflection/test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/deinflection/test.ts')
-rw-r--r--test/deinflection/test.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/deinflection/test.ts b/test/deinflection/test.ts
index 3faa6f8..017a5c7 100644
--- a/test/deinflection/test.ts
+++ b/test/deinflection/test.ts
@@ -2,7 +2,7 @@ import cases from "./cases.ts";
import { core } from '../base.ts';
import { TokenTag } from '../../language/tags.ts';
-cases.forEach(({ input, mustHave, mustNotHave }) => {
+cases.forEach(({ input, mustHave, mustNotHave, forceID }) => {
Deno.test(`deinflection - ${input}`, async () => {
var { tokens } = await core.parseSentence(input);
@@ -11,6 +11,8 @@ cases.forEach(({ input, mustHave, mustNotHave }) => {
// console.log(tokens);
var result = tokens.find(t => t.source == input);
+ if (forceID) result = tokens.find(t => t.term_id == forceID);
+
if (!result)
throw new Error("No deconjugation found for input");