Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('store create preview command', () => {
await StoreCreatePreview.run(['--name', 'Lavender Candles', '--country', 'us', '--json'])

expect(renderSingleTask).toHaveBeenCalledWith({
title: expect.objectContaining({value: 'Creating store'}),
title: expect.objectContaining({value: 'Creating store'}),
task: expect.any(Function),
})
expect(createPreviewStoreCommand).toHaveBeenCalledWith({name: 'Lavender Candles', country: 'US'})
Expand Down
2 changes: 1 addition & 1 deletion packages/store/src/cli/commands/store/create/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default class StoreCreatePreview extends StoreCommand {
}

const result = await renderSingleTask<CreatePreviewStoreResult>({
title: outputContent`Creating store`,
title: outputContent`Creating store`,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is outputContent even necessary here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is the standard cli approach to static messages:

  title: outputContent`Authenticating`                                                                                                                                                                                                                                     
  title: outputContent`Executing GraphQL operation`                                                                                                                                                                                                                        
  title: outputContent`Starting bulk operation`                                                                                                                                                                                                                            
  title: outputContent`Polling bulk operation`                                                                                                                                                                                                                             
  title: outputContent`Uploading bulk operation variables`                                                                                                                                                                                                                 
  title: outputContent`Loading application`                                                                                                                                                                                                                                
  title: outputContent`Loading stored store auth`                                                                                                                                                                                                                          

task: async () => createPreviewStoreCommand({name: flags.name, country: flags.country}),
})

Expand Down
Loading