@@ -463,6 +463,11 @@ Describe 'Nova command model - project, help, and build behavior' {
463463 $script :helpActivationTestCases | Should -Not - BeNullOrEmpty
464464 }
465465
466+ It ' help docs keep Invoke-NovaCli out of the user-facing help surface' {
467+ $script :helpActivationTestCases.HelpTarget | Should -Not - Contain ' Invoke-NovaCli'
468+ (Test-Path - LiteralPath (Join-Path $script :helpDocsDir ' en-US/Invoke-NovaCli.md' )) | Should - BeFalse
469+ }
470+
466471 It ' Get-Help loads synopsis for every command help file discovered in docs' {
467472 foreach ($testCase in $script :helpActivationTestCases ) {
468473 $help = Get-Help $testCase.HelpTarget - ErrorAction Stop
@@ -510,12 +515,17 @@ Describe 'Nova command model - project, help, and build behavior' {
510515 ' WhatIf' ,
511516 ' Confirm'
512517 )
518+ $undocumentedLegacyParametersByCommand = @ {
519+ ' Invoke-NovaRelease' = @ (' PublishOption' )
520+ }
513521
514522 foreach ($testCase in $script :helpActivationTestCases ) {
515523 $command = Get-Command $testCase.HelpTarget - ErrorAction Stop
524+ $undocumentedLegacyParameters = @ ($undocumentedLegacyParametersByCommand [$testCase.HelpTarget ])
516525 $expectedParameterNames = @ (
517526 $command.Parameters.Keys |
518527 Where-Object {$_ -notin $commonParameterNames } |
528+ Where-Object {$_ -notin $undocumentedLegacyParameters } |
519529 Sort-Object
520530 )
521531
@@ -540,6 +550,13 @@ Describe 'Nova command model - project, help, and build behavior' {
540550 }
541551 }
542552
553+ It ' Get-Help keeps legacy Invoke-NovaRelease -PublishOption guidance out of user-facing help' {
554+ $fullText = Get-Help Invoke-NovaRelease - Full - ErrorAction Stop | Out-String
555+
556+ $fullText | Should -Not -Match ([regex ]::Escape(' -PublishOption' ))
557+ {Get-Help Invoke-NovaRelease - Parameter PublishOption - ErrorAction Stop} | Should - Throw
558+ }
559+
543560 It ' Get-Help explains how to manage prerelease self-update eligibility' {
544561 $buildHelp = Get-Help Invoke-NovaBuild - Full - ErrorAction Stop | Out-String
545562 $updateHelp = Get-Help Update-NovaModuleTool - Full - ErrorAction Stop | Out-String
0 commit comments