File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 3737 Export-ModuleMember -Function PublicFunction
3838
3939 # The test script:
40+ BeforeAll {
41+ Import-Module MyModule
42+ }
4043
41- Import-Module MyModule
42-
43- InModuleScope MyModule {
44- Describe 'Testing MyModule' {
45- It 'Tests the Private function' {
44+ Describe 'Testing MyModule' {
45+ It 'Tests the Private function' {
46+ InModuleScope MyModule {
4647 PrivateFunction | Should -Be $true
4748 }
4849 }
5152
5253 Normally you would not be able to access "PrivateFunction" from
5354 the PowerShell session, because the module only exported
54- "PublicFunction". Using InModuleScope allowed this call to
55+ "PublicFunction". Using InModuleScope allowed this call to
5556 "PrivateFunction" to work successfully.
5657
5758 . EXAMPLE
You can’t perform that action at this time.
0 commit comments