File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 55 __testClearFrameworks ,
66 __testRegisterFramework ,
77} from '@tanstack/create'
8+ import * as create from '@tanstack/create'
89
910import * as prompts from '../src/ui-prompts'
1011import * as commandLine from '../src/command-line'
@@ -68,9 +69,24 @@ function setBasicSpies() {
6869 . spyOn ( commandLine , 'resolveStarterSpecifier' )
6970 . mockImplementation ( async ( value ) =>
7071 value === 'blog'
71- ? '/Users/tannerlinsley/GitHub/cli/examples /react/blog/starter.json'
72+ ? 'https://example.com /react/blog/starter.json'
7273 : value ,
7374 )
75+ vi . spyOn ( create , 'loadStarter' ) . mockImplementation (
76+ async ( id ) =>
77+ ( {
78+ id : String ( id ) ,
79+ name : 'Blog' ,
80+ description : 'Blog template' ,
81+ type : 'starter' ,
82+ framework : 'react' ,
83+ mode : 'file-router' ,
84+ typescript : true ,
85+ dependsOn : [ ] ,
86+ files : { } ,
87+ deletedFiles : [ ] ,
88+ } ) as any ,
89+ )
7490 vi . spyOn ( prompts , 'getProjectName' ) . mockImplementation ( async ( ) => 'hello' )
7591 vi . spyOn ( prompts , 'selectTemplate' ) . mockImplementation ( async ( ) => undefined )
7692 vi . spyOn ( prompts , 'selectPackageManager' ) . mockImplementation (
You can’t perform that action at this time.
0 commit comments