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