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" {
# Context "Function checking" { $functionFiles = Get-ChildItem $publicFunctions -Filter *.ps1 |
# $functionFiles = Get-ChildItem $publicFunctions -Filter *.ps1 | Select-Object -ExpandProperty BaseName |
# Select-Object -ExpandProperty BaseName | Where-Object { $_ -notlike "*.Tests" }
# Where-Object { $_ -notlike "*.Tests" }
# $internalFiles = Get-ChildItem $internalFunctions -Filter *.ps1 | $internalFiles = Get-ChildItem $internalFunctions -Filter *.ps1 |
# Select-Object -ExpandProperty BaseName | Select-Object -ExpandProperty BaseName |
# Where-Object { $_ -notlike "*.Tests" } Where-Object { $_ -notlike "*.Tests" }
# #$exportedFunctions = $script:manifest.ExportedFunctions.Values.Name #$exportedFunctions = $script:manifest.ExportedFunctions.Values.Name
# $exportedFunctions = $script:manifest.FunctionsToExport $exportedFunctions = $script:manifest.FunctionsToExport
# foreach ($f in $functionFiles) { foreach ($f in $functionFiles) {
# It "Exports $f" { It "Exports $f" {
# $exportedFunctions -contains $f | Should -Be $true $exportedFunctions -contains $f | Should -Be $true
# } }
# } }
# foreach ($f in $internalFiles) { foreach ($f in $internalFiles) {
# It "Does not export $f" { It "Does not export $f" {
# $exportedFunctions -contains $f | Should -Be $false $exportedFunctions -contains $f | Should -Be $false
# } }
# } }
# } }
Context "Style checking" { Context "Style checking" {