From 84432241ac7777ac473e963471639681ea999582 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Feb 2026 13:20:57 +0000 Subject: [PATCH 1/2] Initial plan From a657b10e876e26680028476291640d7915b94a6c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Feb 2026 13:24:30 +0000 Subject: [PATCH 2/2] Add comprehensive tests for default value display in CLI help Co-authored-by: Goo78 <163220761+Goo78@users.noreply.github.com> --- packages/jsdoc-cli/test/specs/lib/engine.js | 22 +++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/packages/jsdoc-cli/test/specs/lib/engine.js b/packages/jsdoc-cli/test/specs/lib/engine.js index f472b4391..705a13ee5 100644 --- a/packages/jsdoc-cli/test/specs/lib/engine.js +++ b/packages/jsdoc-cli/test/specs/lib/engine.js @@ -410,6 +410,28 @@ describe('@jsdoc/cli/lib/engine', () => { it('throws on a bad maxLength option', () => { expect(() => instance.help({ maxLength: 'long' })).toThrow(); }); + + it('displays default values for flags with default property', () => { + const help = instance.help(); + + expect(help).toContain('Default: ./out'); + expect(help).toContain('Default: utf8'); + }); + + it('displays custom default descriptions when provided', () => { + const help = instance.help(); + + expect(help).toContain('Default: All except `private`'); + }); + + it('does not display default for flags without default or defaultDescription', () => { + const help = instance.help(); + const lines = help.split('\n'); + const helpLine = lines.find((line) => line.includes('--help')); + + expect(helpLine).toBeDefined(); + expect(helpLine).not.toContain('Default:'); + }); }); describe('loadConfig', () => {