aboutsummaryrefslogtreecommitdiff
path: root/test/deinflector.test.js
diff options
context:
space:
mode:
authorStefanVukovic99 <stefanvukovic44@gmail.com>2024-01-27 09:59:39 +0100
committerGitHub <noreply@github.com>2024-01-27 08:59:39 +0000
commita3224f688f44c9c913f32add1223e922ce88e65a (patch)
treeb23432bdfb87418766b6872662749cb85418ffdf /test/deinflector.test.js
parent6ba1ffe74558dd174e3308d48885fb068fa37d55 (diff)
fix deinflection bug (#547)
* fix deinflection bug * add test
Diffstat (limited to 'test/deinflector.test.js')
-rw-r--r--test/deinflector.test.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/deinflector.test.js b/test/deinflector.test.js
index b00625cf..e90704f1 100644
--- a/test/deinflector.test.js
+++ b/test/deinflector.test.js
@@ -31,7 +31,7 @@ const dirname = path.dirname(fileURLToPath(import.meta.url));
* @param {Deinflector} deinflector
* @param {string} source
* @param {string} expectedTerm
- * @param {string} expectedRule
+ * @param {string|undefined} expectedRule
* @param {string[]|undefined} expectedReasons
* @returns {{has: false, reasons: null, rules: null}|{has: true, reasons: string[], rules: number}}
*/
@@ -115,7 +115,7 @@ function testDeinflections() {
{term: '食べる', source: '食べたり', rule: 'v1', reasons: ['-tari']},
{term: '食べる', source: '食べず', rule: 'v1', reasons: ['-zu']},
{term: '食べる', source: '食べぬ', rule: 'v1', reasons: ['-nu']},
- {term: '食べる', source: '食べ', rule: 'v1', reasons: ['masu stem']},
+ {term: '食べる', source: '食べ', rule: 'v1d', reasons: ['masu stem']},
{term: '食べる', source: '食べましょう', rule: 'v1', reasons: ['polite volitional']},
{term: '食べる', source: '食べよう', rule: 'v1', reasons: ['volitional']},
// ['causative passive']
@@ -895,7 +895,9 @@ function testDeinflections() {
{term: 'くる', source: 'くさせられない', rule: 'vk'},
{term: 'かわいい', source: 'かわいげ', rule: 'adj-i', reasons: ['-ge']},
- {term: '可愛い', source: 'かわいげ', rule: 'adj-i', reasons: ['-ge']}
+ {term: '可愛い', source: 'かわいげ', rule: 'adj-i', reasons: ['-ge']},
+
+ {term: '食べる', source: '食べて', reasons: ['-te', 'progressive or perfect', 'masu stem']}
]
},
{