@@ -79,43 +79,33 @@ describe('Unicode', function () {
79
79
}
80
80
} ) ;
81
81
82
- it ( 'shouldCorrectlyInsertUnicodeCharacters' , {
83
- metadata : {
84
- requires : { topology : [ 'single' , 'replicaset' , 'sharded' , 'ssl' , 'heap' , 'wiredtiger' ] }
85
- } ,
86
-
87
- test : function ( done ) {
88
- var configuration = this . configuration ;
89
- var client = configuration . newClient ( configuration . writeConcernMax ( ) , { maxPoolSize : 1 } ) ;
90
- client . connect ( function ( err , client ) {
82
+ it ( 'should Correctly Insert Unicode Characters' , function ( done ) {
83
+ const client = this . configuration . newClient ( this . configuration . writeConcernMax ( ) , {
84
+ maxPoolSize : 1
85
+ } ) ;
86
+ client . connect ( ( err , client ) => {
87
+ expect ( err ) . to . not . exist ;
88
+ const db = client . db ( this . configuration . db ) ;
89
+ db . createCollection ( 'unicode_test_collection' , ( err , collection ) => {
91
90
expect ( err ) . to . not . exist ;
92
- var db = client . db ( configuration . db ) ;
93
- db . createCollection ( 'unicode_test_collection' , function ( err , collection ) {
94
- var test_strings = [ 'ouooueauiOUOOUEAUI' , 'öüóőúéáűíÖÜÓŐÚÉÁŰÍ' , '本荘由利地域に洪水警報' ] ;
95
- collection . insert ( { id : 0 , text : test_strings [ 0 ] } , { writeConcern : { w : 1 } } , function (
96
- err
97
- ) {
91
+ const test_strings = [ 'ouooueauiOUOOUEAUI' , 'öüóőúéáűíÖÜÓŐÚÉÁŰÍ' , '本荘由利地域に洪水警報' ] ;
92
+ collection . insert ( { id : 0 , text : test_strings [ 0 ] } , { writeConcern : { w : 1 } } , err => {
93
+ expect ( err ) . to . not . exist ;
94
+ collection . insert ( { id : 1 , text : test_strings [ 1 ] } , { writeConcern : { w : 1 } } , err => {
98
95
expect ( err ) . to . not . exist ;
99
- collection . insert (
100
- { id : 1 , text : test_strings [ 1 ] } ,
101
- { writeConcern : { w : 1 } } ,
102
- function ( err ) {
96
+ collection . find ( ) . forEach (
97
+ doc => {
98
+ expect ( doc ) . property ( 'text' ) . to . equal ( test_strings [ doc . id ] ) ;
99
+ } ,
100
+ err => {
103
101
expect ( err ) . to . not . exist ;
104
- collection . find ( ) . forEach (
105
- doc => {
106
- expect ( doc ) . property ( 'text' ) . to . equal ( test_strings [ doc . id ] ) ;
107
- } ,
108
- err => {
109
- expect ( err ) . to . not . exist ;
110
- client . close ( done ) ;
111
- }
112
- ) ;
113
- } ) ;
114
- } ) ;
102
+ client . close ( done ) ;
103
+ }
104
+ ) ;
115
105
} ) ;
116
106
} ) ;
117
107
} ) ;
118
- }
108
+ } ) ;
119
109
} ) ;
120
110
121
111
it ( 'shouldCreateObjectWithChineseObjectName' , {
0 commit comments