@@ -78,16 +78,16 @@ describe("bulk insert", function () {
7878 } catch ( error ) {
7979 assert . strictEqual ( error . name , "BulkInsertAbortedException" , error . message ) ;
8080 const bulkInsertCanceled = / T a s k C a n c e l e d E x c e p t i o n / i. test ( error . message ) ;
81- const bulkInsertNotRegisteredYet =
81+ const bulkInsertNotRegisteredYet =
8282 / U n a b l e t o k i l l b u l k i n s e r t o p e r a t i o n , b e c a u s e i t w a s n o t f o u n d o n t h e s e r v e r ./ i. test ( error . message ) ;
83- const bulkInsertSuccessfullyKilled =
83+ const bulkInsertSuccessfullyKilled =
8484 / B u l k i n s e r t w a s a b o r t e d b y t h e u s e r ./ i. test ( error . message ) ;
8585
8686 // this one's racy, so it's one or the other
8787 assert . ok (
88- bulkInsertCanceled
89- || bulkInsertNotRegisteredYet
90- || bulkInsertSuccessfullyKilled ,
88+ bulkInsertCanceled
89+ || bulkInsertNotRegisteredYet
90+ || bulkInsertSuccessfullyKilled ,
9191 "Unexpected error message:" + error . message ) ;
9292 }
9393 } ) ;
@@ -107,16 +107,16 @@ describe("bulk insert", function () {
107107 } catch ( error ) {
108108 assert . strictEqual ( error . name , "BulkInsertAbortedException" , error . message ) ;
109109 const bulkInsertCanceled = / T a s k C a n c e l e d E x c e p t i o n / i. test ( error . message ) ;
110- const bulkInsertNotRegisteredYet =
110+ const bulkInsertNotRegisteredYet =
111111 / U n a b l e t o k i l l b u l k i n s e r t o p e r a t i o n , b e c a u s e i t w a s n o t f o u n d o n t h e s e r v e r ./ i. test ( error . message ) ;
112- const bulkInsertSuccessfullyKilled =
112+ const bulkInsertSuccessfullyKilled =
113113 / B u l k i n s e r t w a s a b o r t e d b y t h e u s e r ./ i. test ( error . message ) ;
114114
115115 // this one's racy, so it's one or the other
116116 assert . ok (
117- bulkInsertCanceled
118- || bulkInsertNotRegisteredYet
119- || bulkInsertSuccessfullyKilled ,
117+ bulkInsertCanceled
118+ || bulkInsertNotRegisteredYet
119+ || bulkInsertSuccessfullyKilled ,
120120 "Unexpected error message:" + error . message ) ;
121121 }
122122 } ) ;
@@ -202,9 +202,11 @@ describe("bulk insert", function () {
202202 assert . ok ( metadata [ "@id" ] , entity [ "id" ] ) ;
203203 const nestedObjectTypes = metadata [ CONSTANTS . Documents . Metadata . NESTED_OBJECT_TYPES ] ;
204204 assert . ok ( nestedObjectTypes ) ;
205- assert . strictEqual ( Object . keys ( nestedObjectTypes ) . length , 2 ) ;
206- assert . strictEqual ( nestedObjectTypes [ "items[]" ] , BulkTestItem . name ) ;
207- assert . strictEqual ( nestedObjectTypes [ "items[].created" ] , "date" ) ;
205+ assert . strictEqual ( Object . keys ( nestedObjectTypes ) . length , 6 ) ;
206+ for ( let i = 0 ; i < 3 ; i ++ ) {
207+ assert . strictEqual ( nestedObjectTypes [ "items." + i ] , BulkTestItem . name ) ;
208+ assert . strictEqual ( nestedObjectTypes [ "items." + i + ".created" ] , "date" ) ;
209+ }
208210 }
209211 } ) ;
210212
0 commit comments