From c4eb09fcf87fd3e82bc8276acd905e513147755b Mon Sep 17 00:00:00 2001 From: Elanthenral Elangovan Date: Tue, 2 Dec 2025 08:11:43 -0800 Subject: [PATCH] ACNA-4221: fixing alias rt to display help commands --- src/commands/runtime/index.js | 2 +- test/commands/runtime/index.test.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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']) }) }) })