Skip to content

Commit 48f6f2f

Browse files
committed
Fixed name of module
1 parent e0a7bd2 commit 48f6f2f

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

tests/general/Help.Tests.ps1

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
.PARAMETER SkipTest
1212
Disables this test.
13-
13+
1414
.PARAMETER CommandPath
1515
List of paths under which the script files are stored.
1616
This test assumes that all functions have their own file that is named after themselves.
@@ -34,13 +34,13 @@
3434
Param (
3535
[switch]
3636
$SkipTest,
37-
37+
3838
[string[]]
3939
$CommandPath = @("$PSScriptRoot\..\..\functions", "$PSScriptRoot\..\..\internal\functions"),
40-
40+
4141
[string]
42-
$ModuleName = "PSDatabasClone",
43-
42+
$ModuleName = "PSDatabaseClone",
43+
4444
[string]
4545
$ExceptionsFile = "$PSScriptRoot\Help.Exceptions.ps1"
4646
)
@@ -56,16 +56,16 @@ $commands = Get-Command -Module (Get-Module $ModuleName) -CommandType Cmdlet, Fu
5656

5757
foreach ($command in $commands) {
5858
$commandName = $command.Name
59-
59+
6060
# Skip all functions that are on the exclusions list
6161
if ($global:FunctionHelpTestExceptions -contains $commandName) { continue }
62-
62+
6363
# The module-qualified command fails on Microsoft.PowerShell.Archive cmdlets
6464
$Help = Get-Help $commandName -ErrorAction SilentlyContinue
6565
$testhelperrors = 0
6666
$testhelpall = 0
6767
Describe "Test help for $commandName" {
68-
68+
6969
$testhelpall += 1
7070
if ($Help.Synopsis -like '*`[`<CommonParameters`>`]*') {
7171
# If help is not found, synopsis in auto-generated help is the syntax diagram
@@ -74,7 +74,7 @@ foreach ($command in $commands) {
7474
}
7575
$testhelperrors += 1
7676
}
77-
77+
7878
$testhelpall += 1
7979
if ([String]::IsNullOrEmpty($Help.Description.Text)) {
8080
# Should be a description for every function
@@ -83,7 +83,7 @@ foreach ($command in $commands) {
8383
}
8484
$testhelperrors += 1
8585
}
86-
86+
8787
$testhelpall += 1
8888
if ([String]::IsNullOrEmpty(($Help.Examples.Example | Select-Object -First 1).Code)) {
8989
# Should be at least one example
@@ -92,7 +92,7 @@ foreach ($command in $commands) {
9292
}
9393
$testhelperrors += 1
9494
}
95-
95+
9696
$testhelpall += 1
9797
if ([String]::IsNullOrEmpty(($Help.Examples.Example.Remarks | Select-Object -First 1).Text)) {
9898
# Should be at least one example description
@@ -101,27 +101,27 @@ foreach ($command in $commands) {
101101
}
102102
$testhelperrors += 1
103103
}
104-
104+
105105
if ($testhelperrors -eq 0) {
106106
It "Ran silently $testhelpall tests" {
107107
$testhelperrors | Should be 0
108108
}
109109
}
110-
110+
111111
$testparamsall = 0
112112
$testparamserrors = 0
113113
Context "Test parameter help for $commandName" {
114-
114+
115115
$Common = 'Debug', 'ErrorAction', 'ErrorVariable', 'InformationAction', 'InformationVariable', 'OutBuffer', 'OutVariable',
116116
'PipelineVariable', 'Verbose', 'WarningAction', 'WarningVariable'
117-
117+
118118
$parameters = $command.ParameterSets.Parameters | Sort-Object -Property Name -Unique | Where-Object Name -notin $common
119119
$parameterNames = $parameters.Name
120120
$HelpParameterNames = $Help.Parameters.Parameter.Name | Sort-Object -Unique
121121
foreach ($parameter in $parameters) {
122122
$parameterName = $parameter.Name
123123
$parameterHelp = $Help.parameters.parameter | Where-Object Name -EQ $parameterName
124-
124+
125125
$testparamsall += 1
126126
if ([String]::IsNullOrEmpty($parameterHelp.Description.Text)) {
127127
# Should be a description for every parameter
@@ -130,7 +130,7 @@ foreach ($command in $commands) {
130130
}
131131
$testparamserrors += 1
132132
}
133-
133+
134134
$testparamsall += 1
135135
$codeMandatory = $parameter.IsMandatory.toString()
136136
if ($parameterHelp.Required -ne $codeMandatory) {
@@ -140,11 +140,11 @@ foreach ($command in $commands) {
140140
}
141141
$testparamserrors += 1
142142
}
143-
143+
144144
if ($HelpTestSkipParameterType[$commandName] -contains $parameterName) { continue }
145-
145+
146146
$codeType = $parameter.ParameterType.Name
147-
147+
148148
$testparamsall += 1
149149
if ($parameter.ParameterType.IsEnum) {
150150
# Enumerations often have issues with the typename not being reliably available

0 commit comments

Comments
 (0)