Skip to content

Commit 3ca5176

Browse files
authored
Merge pull request #389 from elan-llm/alias_map
ACNA-4221: fixing alias rt to display help commands adobe/aio-cli#770
2 parents b350243 + c4eb09f commit 3ca5176

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/commands/runtime/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const RuntimeBaseCommand = require('../../RuntimeBaseCommand')
1616
class IndexCommand extends RuntimeBaseCommand {
1717
async run () {
1818
const help = new Help(this.config)
19-
await help.showHelp(['runtime', '--help'])
19+
await help.showHelp([this.id])
2020
}
2121
}
2222

test/commands/runtime/index.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ describe('instance methods', () => {
5252
test('returns help file for runtime command', () => {
5353
const spy = jest.spyOn(Help.prototype, 'showHelp').mockReturnValue(true)
5454
command.config = {}
55+
command.id = 'runtime' // Set the command ID for the test
5556
return command.run().then(() => {
56-
expect(spy).toHaveBeenCalledWith(['runtime', '--help'])
57+
expect(spy).toHaveBeenCalledWith(['runtime'])
5758
})
5859
})
5960
})

0 commit comments

Comments
 (0)