aboutsummaryrefslogtreecommitdiff
path: root/test/test-japanese-util.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-09-27 18:19:53 -0400
committerGitHub <noreply@github.com>2021-09-27 18:19:53 -0400
commitb784e5b11a596a456eb8879d394fde64bc63aaef (patch)
tree411419b07d224ca1bd11d79cc302a1055a012dd1 /test/test-japanese-util.js
parent729abbf5616f93a641bb6b68593e524b352b2a19 (diff)
Katakana to hiragana conversion options (#1965)
* Refactor convertKatakanaToHiragana * Add keepProlongedSoundMarks option * Test keepProlongedSoundMarks option * Refactor * Add keepProlongedSoundMarks option to hiragana handlebars helper * Update documentation
Diffstat (limited to 'test/test-japanese-util.js')
-rw-r--r--test/test-japanese-util.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/test-japanese-util.js b/test/test-japanese-util.js
index f3b53844..cf1ee87e 100644
--- a/test/test-japanese-util.js
+++ b/test/test-japanese-util.js
@@ -130,11 +130,13 @@ function testConvertKatakanaToHiragana() {
['ヒラガナひらがな', 'ひらがなひらがな'],
['chikaraちからチカラ力', 'chikaraちからちから力'],
['katakana', 'katakana'],
- ['hiragana', 'hiragana']
+ ['hiragana', 'hiragana'],
+ ['カーナー', 'かあなあ'],
+ ['カーナー', 'かーなー', true]
];
- for (const [string, expected] of data) {
- assert.strictEqual(jp.convertKatakanaToHiragana(string), expected);
+ for (const [string, expected, keepProlongedSoundMarks=false] of data) {
+ assert.strictEqual(jp.convertKatakanaToHiragana(string, keepProlongedSoundMarks), expected);
}
}