Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/app/src/cli/prompts/init/init.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ describe('init', () => {

test('it renders branches for templates that have them', async () => {
const answers = {
template: 'https://github.com/Shopify/shopify-app-template-react-router#javascript',
template: 'https://github.com/Shopify/shopify-app-template-react-router#javascript-cli',
}
const options: InitOptions = {}

// Given
vi.mocked(renderSelectPrompt).mockResolvedValueOnce('reactRouter')
vi.mocked(renderSelectPrompt).mockResolvedValueOnce('javascript')
vi.mocked(renderSelectPrompt).mockResolvedValueOnce('javascript-cli')

// When
const got = await init(options)
Expand All @@ -61,8 +61,8 @@ describe('init', () => {
})
expect(renderSelectPrompt).toHaveBeenCalledWith({
choices: [
{label: 'JavaScript', value: 'javascript'},
{label: 'TypeScript', value: 'main'},
{label: 'JavaScript', value: 'javascript-cli'},
{label: 'TypeScript', value: 'main-cli'},
],
message: 'For your React Router template, which language do you want?',
})
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/cli/prompts/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export const templates = {
branches: {
prompt: 'For your React Router template, which language do you want?',
options: {
javascript: {branch: 'javascript', label: 'JavaScript'},
typescript: {branch: 'main', label: 'TypeScript'},
javascript: {branch: 'javascript-cli', label: 'JavaScript'},
typescript: {branch: 'main-cli', label: 'TypeScript'},
},
},
} as Template,
Expand Down
Loading