File tree 1 file changed +20
-0
lines changed
v-next/hardhat-errors/test
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -296,6 +296,17 @@ describe("applyErrorMessageTemplate", () => {
296
296
) ;
297
297
} ) ;
298
298
} ) ;
299
+
300
+ describe ( "Edge cases" , ( ) => {
301
+ it ( "Should support {}" , ( ) => {
302
+ assert . equal (
303
+ applyErrorMessageTemplate ( "foo {} {}" , {
304
+ [ "" ] : "bar" ,
305
+ } ) ,
306
+ "foo bar bar" ,
307
+ ) ;
308
+ } ) ;
309
+ } ) ;
299
310
} ) ;
300
311
} ) ;
301
312
@@ -379,6 +390,15 @@ describe("Type tests", () => {
379
390
hola : ErrorMessageTemplateValue ;
380
391
} > ( ) ;
381
392
} ) ;
393
+
394
+ describe ( "Edge cases" , ( ) => {
395
+ it ( "Should support {}" , ( ) => {
396
+ expectTypeOf < MessagetTemplateArguments < "foo {} {}" > > ( ) . toEqualTypeOf < {
397
+ // eslint-disable-next-line @typescript-eslint/naming-convention
398
+ "" : ErrorMessageTemplateValue ;
399
+ } > ( ) ;
400
+ } ) ;
401
+ } ) ;
382
402
} ) ;
383
403
384
404
describe ( "Hardhat error constructor" , ( ) => {
You can’t perform that action at this time.
0 commit comments