@@ -146,7 +146,7 @@ describe("INTEGRATION: changeEtherBalances matcher", function () {
146
146
)
147
147
) . to . be . eventually . rejectedWith (
148
148
AssertionError ,
149
- "Expected the balance changes of to satisfy the predicate, but they didn't"
149
+ "Expected the balance changes of the accounts to satisfy the predicate, but they didn't"
150
150
) ;
151
151
} ) ;
152
152
@@ -168,7 +168,7 @@ describe("INTEGRATION: changeEtherBalances matcher", function () {
168
168
)
169
169
) . to . be . eventually . rejectedWith (
170
170
AssertionError ,
171
- "Expected the balance changes of to NOT satisfy the predicate, but they did"
171
+ "Expected the balance changes of the accounts to NOT satisfy the predicate, but they did"
172
172
) ;
173
173
} ) ;
174
174
@@ -269,6 +269,34 @@ describe("INTEGRATION: changeEtherBalances matcher", function () {
269
269
`Expected the ether balance of ${ sender . address } (the 1st address in the list) NOT to change by -200 wei`
270
270
) ;
271
271
} ) ;
272
+
273
+ it ( "arrays have different length" , async function ( ) {
274
+ expect ( ( ) =>
275
+ expect (
276
+ sender . sendTransaction ( {
277
+ to : receiver . address ,
278
+ gasPrice : 1 ,
279
+ value : 200 ,
280
+ } )
281
+ ) . to . changeEtherBalances ( [ sender ] , [ "-200" , 200 ] )
282
+ ) . to . throw (
283
+ Error ,
284
+ "The number of accounts (1) is different than the number of expected balance changes (2)"
285
+ ) ;
286
+
287
+ expect ( ( ) =>
288
+ expect (
289
+ sender . sendTransaction ( {
290
+ to : receiver . address ,
291
+ gasPrice : 1 ,
292
+ value : 200 ,
293
+ } )
294
+ ) . to . changeEtherBalances ( [ sender , receiver ] , [ "-200" ] )
295
+ ) . to . throw (
296
+ Error ,
297
+ "The number of accounts (2) is different than the number of expected balance changes (1)"
298
+ ) ;
299
+ } ) ;
272
300
} ) ;
273
301
274
302
it ( "shouldn't run the transaction twice" , async function ( ) {
0 commit comments