Given a PowerShell script (.ps1) with functions and nested functions. The function 'Inner' should not be moved to the outer scope and thus not be exported. How can one define an 'It' test for the 'Inner' function (hopefully without modifying the code)?
Using: PS core 7.1.4:
Function Outer {
Function Inner {
# ...
}
# ...
}
Using: Pester 5.3.0:
Describe "A" {
It "A" { Outer } | Should -be $null # OK
It "B" { Inner } | Should -be $null # ERROR
}