File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -978,10 +978,6 @@ describe( 'cleanForSlug', () => {
978978 expect ( cleanForSlug ( '/Is th@t Déjà_vu? ' ) ) . toBe ( 'is-tht-deja_vu' ) ;
979979 } ) ;
980980
981- it ( 'Should allow non-latin characters' , ( ) => {
982- expect ( cleanForSlug ( 'Καλημέρα Κόσμε' ) ) . toBe ( 'καλημέρα-κόσμε' ) ;
983- } ) ;
984-
985981 it ( 'Should return an empty string for missing argument' , ( ) => {
986982 expect ( cleanForSlug ( ) ) . toBe ( '' ) ;
987983 } ) ;
@@ -994,6 +990,17 @@ describe( 'cleanForSlug', () => {
994990 //The last space is an object replacement character
995991 expect ( cleanForSlug ( 'the long cat' ) ) . toBe ( 'the-long-cat' ) ;
996992 } ) ;
993+
994+ it ( 'Creates a slug for languages that use multibyte encodings' , ( ) => {
995+ expect ( cleanForSlug ( '新荣记 ' ) ) . toBe ( '新荣记' ) ;
996+ expect ( cleanForSlug ( '私のテンプレートパーツのテスト ' ) ) . toBe (
997+ '私のテンプレートパーツのテスト'
998+ ) ;
999+ expect ( cleanForSlug ( 'ქართული ნაწილი' ) ) . toBe ( 'ქართული-ნაწილი' ) ;
1000+ expect ( cleanForSlug ( 'Καλημέρα Κόσμε' ) ) . toBe ( 'καλημέρα-κόσμε' ) ;
1001+ expect ( cleanForSlug ( '안녕하세요 ' ) ) . toBe ( '안녕하세요' ) ;
1002+ expect ( cleanForSlug ( '繁体字 ' ) ) . toBe ( '繁体字' ) ;
1003+ } ) ;
9971004} ) ;
9981005
9991006describe ( 'normalizePath' , ( ) => {
You can’t perform that action at this time.
0 commit comments