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
2 changes: 1 addition & 1 deletion src/commands/runtime/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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])
}
}

Expand Down
3 changes: 2 additions & 1 deletion test/commands/runtime/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
})
})
})
Expand Down