diff --git a/src/commands/runtime/index.js b/src/commands/runtime/index.js index 11d88453..f8914b0a 100644 --- a/src/commands/runtime/index.js +++ b/src/commands/runtime/index.js @@ -16,7 +16,7 @@ const RuntimeBaseCommand = require('../../RuntimeBaseCommand') class IndexCommand extends RuntimeBaseCommand { async run () { const help = new Help(this.config) - await help.showHelp(['runtime', '--help']) + await help.showHelp([this.id]) } } diff --git a/test/commands/runtime/index.test.js b/test/commands/runtime/index.test.js index 31f6b56e..d9499c5e 100644 --- a/test/commands/runtime/index.test.js +++ b/test/commands/runtime/index.test.js @@ -52,8 +52,9 @@ describe('instance methods', () => { test('returns help file for runtime command', () => { const spy = jest.spyOn(Help.prototype, 'showHelp').mockReturnValue(true) command.config = {} + command.id = 'runtime' // Set the command ID for the test return command.run().then(() => { - expect(spy).toHaveBeenCalledWith(['runtime', '--help']) + expect(spy).toHaveBeenCalledWith(['runtime']) }) }) })