More testing

This commit is contained in:
Petri Asikainen 2021-09-04 23:30:52 +03:00
parent de5f83f54c
commit b69c68ef24

View file

@ -109,37 +109,31 @@ Describe "SnipeitPS" {
}
}
# The CI changes I'm testng now will render this section obsolete,
# as it should automatically patch the module manifest file with all
# exported function names.
# Leaving the code here for the moment while I can ensure those
# features are working correctly.
#
# Context "Function checking" {
# $functionFiles = Get-ChildItem $publicFunctions -Filter *.ps1 |
# Select-Object -ExpandProperty BaseName |
# Where-Object { $_ -notlike "*.Tests" }
Context "Function checking" {
$functionFiles = Get-ChildItem $publicFunctions -Filter *.ps1 |
Select-Object -ExpandProperty BaseName |
Where-Object { $_ -notlike "*.Tests" }
# $internalFiles = Get-ChildItem $internalFunctions -Filter *.ps1 |
# Select-Object -ExpandProperty BaseName |
# Where-Object { $_ -notlike "*.Tests" }
$internalFiles = Get-ChildItem $internalFunctions -Filter *.ps1 |
Select-Object -ExpandProperty BaseName |
Where-Object { $_ -notlike "*.Tests" }
# #$exportedFunctions = $script:manifest.ExportedFunctions.Values.Name
# $exportedFunctions = $script:manifest.FunctionsToExport
#$exportedFunctions = $script:manifest.ExportedFunctions.Values.Name
$exportedFunctions = $script:manifest.FunctionsToExport
# foreach ($f in $functionFiles) {
# It "Exports $f" {
# $exportedFunctions -contains $f | Should -Be $true
# }
# }
foreach ($f in $functionFiles) {
It "Exports $f" {
$exportedFunctions -contains $f | Should -Be $true
}
}
# foreach ($f in $internalFiles) {
# It "Does not export $f" {
# $exportedFunctions -contains $f | Should -Be $false
# }
# }
# }
foreach ($f in $internalFiles) {
It "Does not export $f" {
$exportedFunctions -contains $f | Should -Be $false
}
}
}
Context "Style checking" {