@@ -67,7 +67,7 @@ describe("InitCmd", () => {
6767 vi . stubGlobal ( "Bun" , { } ) ;
6868
6969 const command = await CliPlatformTest . invoke < InitCmd > ( InitCmd ) ;
70- vi . spyOn ( ( command as any ) . runtimes , "list" ) . mockReturnValue ( [ "node" , "bun" ] ) ;
70+ vi . spyOn ( ( command as any ) . runtimes , "list" ) . mockReturnValue ( [ "node" , "bun" , "bun-vite" ] ) ;
7171 vi . spyOn ( ( command as any ) . packageManagers , "list" ) . mockReturnValue ( [ "yarn" , "npm" , "pnpm" , "bun" ] ) ;
7272
7373 const prompts = await command . $prompt ( {
@@ -79,7 +79,7 @@ describe("InitCmd", () => {
7979
8080 expect ( runtime ) . toBeDefined ( ) ;
8181 expect ( packageManager ) . toBeDefined ( ) ;
82- expect ( ( runtime as any ) . choices . map ( ( choice : any ) => choice . value ) ) . toEqual ( [ "bun" ] ) ;
82+ expect ( ( runtime as any ) . choices . map ( ( choice : any ) => choice . value ) ) . toEqual ( [ "bun" , "bun-vite" ] ) ;
8383 expect ( ( packageManager as any ) . choices . map ( ( choice : any ) => choice . value ) ) . toEqual ( [ "bun" ] ) ;
8484 } ) ;
8585
@@ -99,6 +99,22 @@ describe("InitCmd", () => {
9999 expect ( mapped . packageManager ) . toEqual ( "bun" ) ;
100100 } ) ;
101101
102+ it ( "should preserve bun-vite runtime in bunx mode" , async ( ) => {
103+ vi . stubGlobal ( "Bun" , { } ) ;
104+
105+ const command = await CliPlatformTest . invoke < InitCmd > ( InitCmd ) ;
106+ const mapped = command . $mapContext ( {
107+ root : "." ,
108+ projectName : "project" ,
109+ features : [ ] ,
110+ runtime : "bun-vite" ,
111+ packageManager : "npm"
112+ } ) ;
113+
114+ expect ( mapped . runtime ) . toEqual ( "bun-vite" ) ;
115+ expect ( mapped . packageManager ) . toEqual ( "bun" ) ;
116+ } ) ;
117+
102118 it ( "should write premium RC files without returning task-like results" , async ( ) => {
103119 const command = await CliPlatformTest . invoke < InitCmd > ( InitCmd ) ;
104120 const createFromTemplate = vi . spyOn ( ( command as any ) . project , "createFromTemplate" ) . mockResolvedValue ( { rendered : true } ) ;
0 commit comments