import DirectCoreClient from '../../core/direct/client.ts'; import cases from "./cases.ts"; import { core } from '../base.ts'; cases.forEach(({ input, tags }) => { Deno.test(`deinflection - ${input}`, async () => { var { tokens } = await core.parseSentence(input); if (tokens.length == 0) throw new Error("No parsed tokens for input"); // console.log(tokens); var result = tokens.find(t => t.source == input); if (!result) throw new Error("No deconjugation found for input"); for (var tag of tags) if (!result.tags.includes(tag)) throw new Error(`Deconjugation doesn't include tag ${tag}`); }); })