File tree Expand file tree Collapse file tree 3 files changed +28
-2
lines changed Expand file tree Collapse file tree 3 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 4040 "@types/mocha" : " ^9" ,
4141 "chai" : " ^4" ,
4242 "cross-env" : " ^7" ,
43+ "i18next" : " >=8.4.0" ,
4344 "mocha" : " ^9" ,
4445 "nyc" : " ^15" ,
4546 "ts-node" : " ^10" ,
Original file line number Diff line number Diff line change 1616 "noUnusedLocals" : true ,
1717 "noUnusedParameters" : true ,
1818 "noImplicitReturns" : true ,
19- "noFallthroughCasesInSwitch" : true
19+ "noFallthroughCasesInSwitch" : true ,
20+ "esModuleInterop" : true
2021 },
2122 "exclude" : []
22- }
23+ }
Original file line number Diff line number Diff line change 1+ import "mocha" ;
2+ import { assert } from "chai" ;
3+ import { KoreanPostpositionProcessor } from "../src" ;
4+ import i18next from "i18next" ;
5+
6+ describe ( "postposition processor with i18next" , ( ) => {
7+ const i18next_config = {
8+ lng : "ko" ,
9+ postProcess : [ "korean-postposition" ] ,
10+ resources : {
11+ ko : {
12+ translation : {
13+ text : "{{some_value}}[[를]] 수정했다." ,
14+ } ,
15+ } ,
16+ } ,
17+ } ;
18+
19+ it ( "should work without option" , ( ) => {
20+ i18next . use ( new KoreanPostpositionProcessor ( ) ) ;
21+ i18next . init ( i18next_config ) ;
22+ assert ( i18next . t ( "text" , { some_value : "버그" } ) , "버그를 수정했다." ) ;
23+ } ) ;
24+ } ) ;
You can’t perform that action at this time.
0 commit comments