diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-07-09 17:31:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-09 17:31:16 -0400 |
commit | 0d167095479822adf1ed8918e3d1a349b3a53377 (patch) | |
tree | d99c720a58451e70d44d4a03b1c2c2c3819328a8 /test | |
parent | daa44a8389806046ca8fde9fa1c96c1e961393f4 (diff) |
JapaneseUtil updates (#1813)
* Rename test file
* Use shorthand
* Add support checking functions
* Remove convertReading from JapaneseUtil
Diffstat (limited to 'test')
-rw-r--r-- | test/test-japanese-util.js (renamed from test/test-japanese.js) | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/test/test-japanese.js b/test/test-japanese-util.js index 9452a1d1..82abf50b 100644 --- a/test/test-japanese.js +++ b/test/test-japanese-util.js @@ -171,48 +171,6 @@ function testConvertToRomaji() { } } -function testConvertReading() { - const data = [ - [['アリガトウ', 'アリガトウ', 'hiragana'], 'ありがとう'], - [['アリガトウ', 'アリガトウ', 'katakana'], 'アリガトウ'], - [['アリガトウ', 'アリガトウ', 'romaji'], 'arigatou'], - [['アリガトウ', 'アリガトウ', 'none'], ''], - [['アリガトウ', 'アリガトウ', 'default'], 'アリガトウ'], - - [['ありがとう', 'ありがとう', 'hiragana'], 'ありがとう'], - [['ありがとう', 'ありがとう', 'katakana'], 'アリガトウ'], - [['ありがとう', 'ありがとう', 'romaji'], 'arigatou'], - [['ありがとう', 'ありがとう', 'none'], ''], - [['ありがとう', 'ありがとう', 'default'], 'ありがとう'], - - [['有り難う', 'ありがとう', 'hiragana'], 'ありがとう'], - [['有り難う', 'ありがとう', 'katakana'], 'アリガトウ'], - [['有り難う', 'ありがとう', 'romaji'], 'arigatou'], - [['有り難う', 'ありがとう', 'none'], ''], - [['有り難う', 'ありがとう', 'default'], 'ありがとう'], - - // Cases with falsy readings - - [['ありがとう', '', 'hiragana'], ''], - [['ありがとう', '', 'katakana'], ''], - [['ありがとう', '', 'romaji'], 'arigatou'], - [['ありがとう', '', 'none'], ''], - [['ありがとう', '', 'default'], ''], - - // Cases with falsy readings and kanji terms - - [['有り難う', '', 'hiragana'], ''], - [['有り難う', '', 'katakana'], ''], - [['有り難う', '', 'romaji'], ''], - [['有り難う', '', 'none'], ''], - [['有り難う', '', 'default'], ''] - ]; - - for (const [[term, reading, readingMode], expected] of data) { - assert.strictEqual(jp.convertReading(term, reading, readingMode), expected); - } -} - function testConvertNumericToFullWidth() { const data = [ ['0123456789', '0123456789'], @@ -888,7 +846,6 @@ function main() { testConvertKatakanaToHiragana(); testConvertHiraganaToKatakana(); testConvertToRomaji(); - testConvertReading(); testConvertNumericToFullWidth(); testConvertHalfWidthKanaToFullWidth(); testConvertAlphabeticToKana(); |