File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -89,12 +89,8 @@ describe("Transactions", () => {
8989
9090 it ( "can insert two documents at a time" , async ( ) => {
9191 const trx = await db . beginTransaction ( collection ) ;
92- const [ meta1 , meta2 ] = await trx . run ( ( ) =>
93- Promise . all ( [
94- collection . save ( { _key : "test1" } ) ,
95- collection . save ( { _key : "test2" } )
96- ] )
97- ) ;
92+ const meta1 = await trx . run ( ( ) => collection . save ( { _key : "test1" } ) ) ;
93+ const meta2 = await trx . run ( ( ) => collection . save ( { _key : "test2" } ) ) ;
9894 expect ( meta1 ) . to . have . property ( "_key" , "test1" ) ;
9995 expect ( meta2 ) . to . have . property ( "_key" , "test2" ) ;
10096 const { id, status } = await trx . commit ( ) ;
@@ -121,12 +117,8 @@ describe("Transactions", () => {
121117
122118 itRdb ( "does not leak when inserting two documents at a time" , async ( ) => {
123119 const trx = await db . beginTransaction ( collection ) ;
124- await trx . run ( ( ) =>
125- Promise . all ( [
126- collection . save ( { _key : "test1" } ) ,
127- collection . save ( { _key : "test2" } )
128- ] )
129- ) ;
120+ await trx . run ( ( ) => collection . save ( { _key : "test1" } ) ) ;
121+ await trx . run ( ( ) => collection . save ( { _key : "test2" } ) ) ;
130122 let doc : any ;
131123 try {
132124 doc = await collection . document ( "test1" ) ;
You can’t perform that action at this time.
0 commit comments