@@ -832,13 +832,13 @@ describe("BigNumber matchers", function () {
832
832
833
833
describe ( `when using .to.${ operator } ` , function ( ) {
834
834
it ( "with an unsafe int as the first param" , function ( ) {
835
- expect ( ( ) => expect ( unsafeInt ) . to [ operator ] ( BigInt ( 1 ) ) ) . to . throw (
835
+ expect ( ( ) => expect ( unsafeInt ) . to [ operator ] ( 1n ) ) . to . throw (
836
836
HardhatError ,
837
837
msg
838
838
) ;
839
839
} ) ;
840
840
it ( "with an unsafe int as the second param" , function ( ) {
841
- expect ( ( ) => expect ( BigInt ( 1 ) ) . to [ operator ] ( unsafeInt ) ) . to . throw (
841
+ expect ( ( ) => expect ( 1n ) . to [ operator ] ( unsafeInt ) ) . to . throw (
842
842
HardhatError ,
843
843
msg
844
844
) ;
@@ -847,14 +847,16 @@ describe("BigNumber matchers", function () {
847
847
848
848
describe ( `when using .not.to.${ operator } ` , function ( ) {
849
849
it ( "with an unsafe int as the first param" , function ( ) {
850
- expect ( ( ) =>
851
- expect ( unsafeInt ) . not . to [ operator ] ( BigInt ( 1 ) )
852
- ) . to . throw ( HardhatError , msg ) ;
850
+ expect ( ( ) => expect ( unsafeInt ) . not . to [ operator ] ( 1n ) ) . to . throw (
851
+ HardhatError ,
852
+ msg
853
+ ) ;
853
854
} ) ;
854
855
it ( "with an unsafe int as the second param" , function ( ) {
855
- expect ( ( ) =>
856
- expect ( BigInt ( 1 ) ) . not . to [ operator ] ( unsafeInt )
857
- ) . to . throw ( HardhatError , msg ) ;
856
+ expect ( ( ) => expect ( 1n ) . not . to [ operator ] ( unsafeInt ) ) . to . throw (
857
+ HardhatError ,
858
+ msg
859
+ ) ;
858
860
} ) ;
859
861
} ) ;
860
862
} ) ;
@@ -1153,37 +1155,43 @@ describe("BigNumber matchers", function () {
1153
1155
1154
1156
describe ( `when using .to.${ operator } ` , function ( ) {
1155
1157
it ( "with an unsafe int as the first param" , function ( ) {
1156
- expect ( ( ) =>
1157
- expect ( unsafeInt ) . to [ operator ] ( BigInt ( 1 ) , BigInt ( 1 ) )
1158
- ) . to . throw ( HardhatError , msg ) ;
1158
+ expect ( ( ) => expect ( unsafeInt ) . to [ operator ] ( 1n , 1n ) ) . to . throw (
1159
+ HardhatError ,
1160
+ msg
1161
+ ) ;
1159
1162
} ) ;
1160
1163
it ( "with an unsafe int as the second param" , function ( ) {
1161
- expect ( ( ) =>
1162
- expect ( BigInt ( 1 ) ) . to [ operator ] ( unsafeInt , BigInt ( 1 ) )
1163
- ) . to . throw ( HardhatError , msg ) ;
1164
+ expect ( ( ) => expect ( 1n ) . to [ operator ] ( unsafeInt , 1n ) ) . to . throw (
1165
+ HardhatError ,
1166
+ msg
1167
+ ) ;
1164
1168
} ) ;
1165
1169
it ( "with an unsafe int as the third param" , function ( ) {
1166
- expect ( ( ) =>
1167
- expect ( BigInt ( 1 ) ) . to [ operator ] ( BigInt ( 1 ) , unsafeInt )
1168
- ) . to . throw ( HardhatError , msg ) ;
1170
+ expect ( ( ) => expect ( 1n ) . to [ operator ] ( 1n , unsafeInt ) ) . to . throw (
1171
+ HardhatError ,
1172
+ msg
1173
+ ) ;
1169
1174
} ) ;
1170
1175
} ) ;
1171
1176
1172
1177
describe ( `when using not.to.${ operator } ` , function ( ) {
1173
1178
it ( "with an unsafe int as the first param" , function ( ) {
1174
- expect ( ( ) =>
1175
- expect ( unsafeInt ) . not . to [ operator ] ( BigInt ( 1 ) , BigInt ( 1 ) )
1176
- ) . to . throw ( HardhatError , msg ) ;
1179
+ expect ( ( ) => expect ( unsafeInt ) . not . to [ operator ] ( 1n , 1n ) ) . to . throw (
1180
+ HardhatError ,
1181
+ msg
1182
+ ) ;
1177
1183
} ) ;
1178
1184
it ( "with an unsafe int as the second param" , function ( ) {
1179
- expect ( ( ) =>
1180
- expect ( BigInt ( 1 ) ) . not . to [ operator ] ( unsafeInt , BigInt ( 1 ) )
1181
- ) . to . throw ( HardhatError , msg ) ;
1185
+ expect ( ( ) => expect ( 1n ) . not . to [ operator ] ( unsafeInt , 1n ) ) . to . throw (
1186
+ HardhatError ,
1187
+ msg
1188
+ ) ;
1182
1189
} ) ;
1183
1190
it ( "with an unsafe int as the third param" , function ( ) {
1184
- expect ( ( ) =>
1185
- expect ( BigInt ( 1 ) ) . not . to [ operator ] ( BigInt ( 1 ) , unsafeInt )
1186
- ) . to . throw ( HardhatError , msg ) ;
1191
+ expect ( ( ) => expect ( 1n ) . not . to [ operator ] ( 1n , unsafeInt ) ) . to . throw (
1192
+ HardhatError ,
1193
+ msg
1194
+ ) ;
1187
1195
} ) ;
1188
1196
} ) ;
1189
1197
} ) ;
@@ -1198,7 +1206,7 @@ describe("BigNumber matchers", function () {
1198
1206
) ;
1199
1207
1200
1208
// number and bigint
1201
- expect ( ( ) => expect ( 1 ) . to . equal ( BigInt ( 2 ) , "custom message" ) ) . to . throw (
1209
+ expect ( ( ) => expect ( 1 ) . to . equal ( 2n , "custom message" ) ) . to . throw (
1202
1210
AssertionError ,
1203
1211
"custom message"
1204
1212
) ;
@@ -1210,7 +1218,7 @@ describe("BigNumber matchers", function () {
1210
1218
) ;
1211
1219
1212
1220
// number and bigint
1213
- expect ( ( ) => expect ( [ 1 ] ) . to . equal ( [ BigInt ( 2 ) ] , "custom message" ) ) . to . throw (
1221
+ expect ( ( ) => expect ( [ 1 ] ) . to . equal ( [ 2n ] , "custom message" ) ) . to . throw (
1214
1222
AssertionError ,
1215
1223
"custom message"
1216
1224
) ;
0 commit comments