From 2487cfe464caec2f006ff176a8e5c85a435149eb Mon Sep 17 00:00:00 2001 From: Jesse MacFadyen Date: Wed, 20 Apr 2022 16:06:24 -0700 Subject: [PATCH] Clearer help text for apps with multiple extensions (#526) * Clearer help text for apps with multiple extensions Relates to #522 * test for -e flag, not entire error message --- src/commands/app/run.js | 2 +- test/commands/app/run.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/app/run.js b/src/commands/app/run.js index 536d25c8..4c570698 100644 --- a/src/commands/app/run.js +++ b/src/commands/app/run.js @@ -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] diff --git a/test/commands/app/run.test.js b/test/commands/app/run.test.js index 8762c32b..5ae74b6a 100644 --- a/test/commands/app/run.test.js +++ b/test/commands/app/run.test.js @@ -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 () => {