aboutsummaryrefslogtreecommitdiff
path: root/test/japanese-util.test.js
diff options
context:
space:
mode:
authorStefanVukovic99 <stefanvukovic44@gmail.com>2024-05-22 22:45:39 +0200
committerGitHub <noreply@github.com>2024-05-22 20:45:39 +0000
commitd19b898792bffed8ab2d5724472e5b65a5f5b146 (patch)
treeb3e0d5111d748dfcc5d74d9dbf68e79193fa6a7f /test/japanese-util.test.js
parent125cde3d98c18b08e71e075b4a9776fc7bd4b4a0 (diff)
[ja] add preprocessor for width of alphabetic characters (#964)
* add japanese text preprocessor for variants in width of alphabetic characters * try combining with numeric to improve performance * Update ext/js/language/ja/japanese.js Co-authored-by: Kuuuube <61125188+Kuuuube@users.noreply.github.com> Signed-off-by: StefanVukovic99 <stefanvukovic44@gmail.com> * Update ext/js/language/ja/japanese.js Co-authored-by: Kuuuube <61125188+Kuuuube@users.noreply.github.com> Signed-off-by: StefanVukovic99 <stefanvukovic44@gmail.com> * fix tests --------- Signed-off-by: StefanVukovic99 <stefanvukovic44@gmail.com> Co-authored-by: Kuuuube <61125188+Kuuuube@users.noreply.github.com>
Diffstat (limited to 'test/japanese-util.test.js')
-rw-r--r--test/japanese-util.test.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/japanese-util.test.js b/test/japanese-util.test.js
index bff51f85..63ac5cdf 100644
--- a/test/japanese-util.test.js
+++ b/test/japanese-util.test.js
@@ -178,17 +178,17 @@ describe('Japanese utility functions', () => {
});
});
- describe('convertNumericToFullWidth', () => {
+ describe('convertAlphanumericToFullWidth', () => {
/** @type {[string: string, expected: string][]} */
const data = [
['0123456789', '0123456789'],
- ['abcdefghij', 'abcdefghij'],
+ ['abcdefghij', 'abcdefghij'],
['カタカナ', 'カタカナ'],
['ひらがな', 'ひらがな']
];
test.each(data)('%s -> %o', (string, expected) => {
- expect(jp.convertNumericToFullWidth(string)).toStrictEqual(expected);
+ expect(jp.convertAlphanumericToFullWidth(string)).toStrictEqual(expected);
});
});