We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 25548db commit 81d46ceCopy full SHA for 81d46ce
src/functions/InModuleScope.ps1
@@ -37,12 +37,13 @@
37
Export-ModuleMember -Function PublicFunction
38
39
# The test script:
40
+ BeforeAll {
41
+ Import-Module MyModule
42
+ }
43
- Import-Module MyModule
-
- InModuleScope MyModule {
44
- Describe 'Testing MyModule' {
45
- It 'Tests the Private function' {
+ Describe 'Testing MyModule' {
+ It 'Tests the Private function' {
46
+ InModuleScope MyModule {
47
PrivateFunction | Should -Be $true
48
}
49
@@ -51,7 +52,7 @@
51
52
53
Normally you would not be able to access "PrivateFunction" from
54
the PowerShell session, because the module only exported
- "PublicFunction". Using InModuleScope allowed this call to
55
+ "PublicFunction". Using InModuleScope allowed this call to
56
"PrivateFunction" to work successfully.
57
58
.EXAMPLE
0 commit comments