@@ -127,7 +127,6 @@ interface Fixture {
127127 installed ?: Installed
128128 isolatedDecl ?: boolean
129129 oxc ?: Options [ 'oxc' ]
130- vue ?: boolean
131130 tsc ?: Options [ 'tsc' ]
132131 customLanguages ?: Options [ 'customLanguages' ]
133132 tsgo ?: Options [ 'tsgo' ]
@@ -147,7 +146,6 @@ function formatTitle(fixture: Fixture): string {
147146 if ( fixture . isolatedDecl ) parts . push ( 'isolatedDecl' )
148147 if ( fixture . oxc !== undefined )
149148 parts . push ( `oxc=${ JSON . stringify ( fixture . oxc ) } ` )
150- if ( fixture . vue ) parts . push ( 'vue' )
151149 if ( fixture . tsc !== undefined )
152150 parts . push ( `tsc=${ JSON . stringify ( fixture . tsc ) } ` )
153151 if ( fixture . customLanguages )
@@ -379,43 +377,43 @@ describe('resolve generator', () => {
379377 //#endregion
380378
381379 //#region vue (Volar-based, requires tsc)
382- { vue : true , expected : 'tsc' } ,
380+ { tsc : { vue : true } , expected : 'tsc' } ,
383381 {
384382 installed : [ false , false ] ,
385- vue : true ,
383+ tsc : { vue : true } ,
386384 expected : 'TypeScript is not installed' ,
387385 isThrow : true ,
388386 } ,
389387 {
390388 installed : [ 7 , false ] ,
391- vue : true ,
389+ tsc : { vue : true } ,
392390 expected : 'does not provide the classic TypeScript API required by Vue' ,
393391 isThrow : true ,
394392 } ,
395393 {
396- vue : true ,
394+ tsc : { vue : true } ,
397395 generator : 'oxc' ,
398396 expected : 'require the `tsc` generator' ,
399397 isThrow : true ,
400398 } ,
401399 {
402- vue : true ,
400+ tsc : { vue : true } ,
403401 generator : 'tsgo' ,
404402 expected : 'require the `tsc` generator' ,
405403 isThrow : true ,
406404 } ,
407405 {
408406 installed : [ 'next' , false ] ,
409- vue : true ,
407+ tsc : { vue : true } ,
410408 generator : 'tsgo' ,
411409 expected : 'require the `tsc` generator' ,
412410 isThrow : true ,
413411 } ,
414- { vue : true , generator : 'tsc' , expected : 'tsc' } ,
415- { vue : true , tsc : { parallel : true } , expected : 'tsc' } ,
416- { vue : true , isolatedDecl : true , expected : 'tsc' } ,
412+ { tsc : { vue : true } , generator : 'tsc' , expected : 'tsc' } ,
413+ { tsc : { vue : true , parallel : true } , expected : 'tsc' } ,
414+ { tsc : { vue : true } , isolatedDecl : true , expected : 'tsc' } ,
417415 // tsgo settings are ignored when tsc is selected
418- { installed : [ 6 , 'next' ] , vue : true , tsgo : { } , expected : 'tsc' } ,
416+ { installed : [ 6 , 'next' ] , tsc : { vue : true } , tsgo : { } , expected : 'tsc' } ,
419417 //#endregion
420418
421419 //#region Volar-based custom language (requires tsc)
@@ -454,7 +452,7 @@ describe('resolve generator', () => {
454452 { customLanguages : [ volarLanguage ] , isolatedDecl : true , expected : 'tsc' } ,
455453 {
456454 customLanguages : [ volarLanguage , plainLanguage ] ,
457- vue : true ,
455+ tsc : { vue : true } ,
458456 expected : 'tsc' ,
459457 } ,
460458 //#endregion
@@ -527,7 +525,6 @@ describe('resolve generator', () => {
527525 installed = [ 6 , false ] ,
528526 isolatedDecl,
529527 oxc,
530- vue,
531528 tsc,
532529 customLanguages,
533530 tsgo,
@@ -545,7 +542,6 @@ describe('resolve generator', () => {
545542 isolatedDeclarations : isolatedDecl ,
546543 } ,
547544 oxc,
548- vue,
549545 tsc : tsc && { ...tsc } ,
550546 // resolveOptions may push into the array (e.g. vue), so avoid
551547 // sharing the same array between fixtures
@@ -568,14 +564,17 @@ describe('resolve generator', () => {
568564 )
569565 expect ( resolved . tsgo . vfs ) . toBe ( tsgo ?. vfs ?? false )
570566 expect ( resolved . tsc ) . toStrictEqual ( {
567+ vue : typeof tsc ?. vue === 'object' ? tsc . vue : tsc ?. vue ? { } : false ,
571568 build : tsc ?. build ?? false ,
572569 incremental : tsc ?. incremental ?? false ,
573570 parallel : tsc ?. parallel ?? false ,
574571 eager : tsc ?. eager ?? false ,
575572 newContext : tsc ?. newContext ?? false ,
576573 } )
577574 if ( resolved . generator === 'tsgo' ) {
578- expect ( logger . info ) . toHaveBeenCalledWith ( 'Emit types with TypeScript Go' )
575+ expect ( logger . info ) . toHaveBeenCalledWith (
576+ 'Emit types with TypeScript Go' ,
577+ )
579578 }
580579 } ,
581580 )
0 commit comments