Skip to content

Commit

Permalink
Clearer help text for apps with multiple extensions (#526)
Browse files Browse the repository at this point in the history
* Clearer help text for apps with multiple extensions

Relates to #522

* test for -e flag, not entire error message
  • Loading branch information
purplecabbage authored Apr 20, 2022
1 parent 7a32a8f commit 2487cfe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/commands/app/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Run extends BaseCommand {
const runConfigs = this.getAppExtConfigs(flags)
const entries = Object.entries(runConfigs)
if (entries.length > 1) {
this.error('You can only run one implementation at the time, please filter with the \'-e\' flag.')
this.error('Your app implements multiple extensions. You can only run one at the time, please select which extension to run with the \'-e\' flag.')
}
const name = entries[0][0]
const config = entries[0][1]
Expand Down
2 changes: 1 addition & 1 deletion test/commands/app/run.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ describe('run', () => {
await command.run()

expect(command.error).toHaveBeenCalledTimes(1)
expect(command.error).toHaveBeenCalledWith('You can only run one implementation at the time, please filter with the \'-e\' flag.')
expect(command.error).toHaveBeenCalledWith(expect.stringContaining('\'-e\' flag'))
})

test('run a single extension', async () => {
Expand Down

0 comments on commit 2487cfe

Please sign in to comment.