@@ -352,7 +352,7 @@ describe('format directive config', () => {
352
352
config : FormattedDirectiveArguments
353
353
args : ReadonlyArray < ConstArgumentNode >
354
354
}
355
- want : string
355
+ want : string [ ]
356
356
} [ ] = [
357
357
{
358
358
name : 'string' ,
@@ -364,7 +364,7 @@ describe('format directive config', () => {
364
364
msg : `"hello"` ,
365
365
} ) ,
366
366
} ,
367
- want : `.required("hello")` ,
367
+ want : [ `.required("hello")` ] ,
368
368
} ,
369
369
{
370
370
name : 'string with additional stuff' ,
@@ -376,7 +376,7 @@ describe('format directive config', () => {
376
376
startWith : `"hello"` ,
377
377
} ) ,
378
378
} ,
379
- want : `.matched("^hello")` ,
379
+ want : [ `.matched("^hello")` ] ,
380
380
} ,
381
381
{
382
382
name : 'number' ,
@@ -388,7 +388,7 @@ describe('format directive config', () => {
388
388
minLength : `1` ,
389
389
} ) ,
390
390
} ,
391
- want : `.min(1)` ,
391
+ want : [ `.min(1)` ] ,
392
392
} ,
393
393
{
394
394
name : 'boolean' ,
@@ -401,7 +401,7 @@ describe('format directive config', () => {
401
401
enabled : `true` ,
402
402
} ) ,
403
403
} ,
404
- want : `.strict(true)` ,
404
+ want : [ `.strict(true)` ] ,
405
405
} ,
406
406
{
407
407
name : 'list' ,
@@ -413,7 +413,7 @@ describe('format directive config', () => {
413
413
minLength : `[1, "message"]` ,
414
414
} ) ,
415
415
} ,
416
- want : `.min(1, "message")` ,
416
+ want : [ `.min(1, "message")` ] ,
417
417
} ,
418
418
{
419
419
name : 'object in list' ,
@@ -425,7 +425,7 @@ describe('format directive config', () => {
425
425
matches : `["hello", {message:"message", excludeEmptyString:true}]` ,
426
426
} ) ,
427
427
} ,
428
- want : `.matches("hello", {"message":"message","excludeEmptyString":true})` ,
428
+ want : [ `.matches("hello", {"message":"message","excludeEmptyString":true})` ] ,
429
429
} ,
430
430
{
431
431
name : 'two arguments but matched to first argument' ,
@@ -438,7 +438,7 @@ describe('format directive config', () => {
438
438
msg2 : `"world"` ,
439
439
} ) ,
440
440
} ,
441
- want : `.required("hello")` ,
441
+ want : [ `.required("hello")` , `` ] ,
442
442
} ,
443
443
{
444
444
name : 'two arguments but matched to second argument' ,
@@ -451,7 +451,7 @@ describe('format directive config', () => {
451
451
msg2 : `"world"` ,
452
452
} ) ,
453
453
} ,
454
- want : ` .required("world")`,
454
+ want : [ `` , ` .required("world")`] ,
455
455
} ,
456
456
{
457
457
name : 'two arguments matched all' ,
@@ -465,7 +465,7 @@ describe('format directive config', () => {
465
465
minLength : `1` ,
466
466
} ) ,
467
467
} ,
468
- want : `.required("message").min(1)` ,
468
+ want : [ `.required("message")` , ` .min(1)`] ,
469
469
} ,
470
470
{
471
471
name : 'argument matches validation schema api' ,
@@ -479,7 +479,7 @@ describe('format directive config', () => {
479
479
format : `"uri"` ,
480
480
} ) ,
481
481
} ,
482
- want : `.url()` ,
482
+ want : [ `.url()` ] ,
483
483
} ,
484
484
{
485
485
name : 'argument matched argument but doesn\'t match api' ,
@@ -493,7 +493,7 @@ describe('format directive config', () => {
493
493
format : `"uuid"` ,
494
494
} ) ,
495
495
} ,
496
- want : `` ,
496
+ want : [ `` ] ,
497
497
} ,
498
498
{
499
499
name : 'complex' ,
@@ -509,7 +509,7 @@ describe('format directive config', () => {
509
509
format : `"uri"` ,
510
510
} ) ,
511
511
} ,
512
- want : `.required("message").url()` ,
512
+ want : [ `.required("message")` , ` .url()`] ,
513
513
} ,
514
514
{
515
515
name : 'complex 2' ,
@@ -525,7 +525,7 @@ describe('format directive config', () => {
525
525
format : `"uuid"` ,
526
526
} ) ,
527
527
} ,
528
- want : `.required("message")` ,
528
+ want : [ `.required("message")` , `` ] ,
529
529
} ,
530
530
] ;
531
531
for ( const tc of cases ) {
0 commit comments