Skip to content

Commit a045e99

Browse files
author
Elanthenral Elangovan
committed
ACNA-4221: fixing alias rt to display help commands
1 parent b350243 commit a045e99

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"@adobe/eslint-config-aio-lib-config": "^4.0.0",
3131
"@babel/core": "^7.16.12",
3232
"@babel/preset-env": "^7.16.11",
33+
"@jest/test-sequencer": "^30.2.0",
3334
"babel-jest": "^29.5.0",
3435
"babel-runtime": "^6.26.0",
3536
"dedent-js": "^1.0.1",
@@ -44,7 +45,7 @@
4445
"eslint-plugin-node": "^11.1.0",
4546
"eslint-plugin-promise": "^6.6.0",
4647
"execa": "^4.0.0",
47-
"jest": "^29.6.2",
48+
"jest": "^29.5.0",
4849
"jest-junit": "^16.0.0",
4950
"jest-plugin-fs": "^2.9.0",
5051
"oclif": "^3.2.0",

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)