2019-01-16 12:55:29 +01:00
|
|
|
$RepoRoot = (Get-Item -Path (Get-GitDirectory) -Force).Parent | Select-Object -ExpandProperty 'FullName'
|
|
|
|
Write-Verbose -Message ('RepoRoot: {0}' -f $RepoRoot) -Verbose
|
2018-03-09 14:02:51 +01:00
|
|
|
|
2019-01-16 12:55:29 +01:00
|
|
|
$ManifestFilePath = Join-Path -Path $RepoRoot -ChildPath '/src/PSCredentialStore.psd1'
|
|
|
|
Write-Verbose -Message ("ManifestFilePath: {0}" -f $ManifestFilePath) -Verbose
|
2018-03-09 14:02:51 +01:00
|
|
|
Describe "Pre-Flight module tests" {
|
|
|
|
Context "Manifest file related" {
|
2019-01-16 12:55:29 +01:00
|
|
|
It "Test the parsed file itself" {
|
|
|
|
{ Test-ModuleManifest -Path $ManifestFilePath -Verbose } | Should -Not -Throw
|
2018-03-09 14:02:51 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
Context "Module consistency tests" {
|
2019-01-16 12:55:29 +01:00
|
|
|
It "Importing should work" {
|
|
|
|
{ Import-Module -Name $ManifestFilePath -Global -Force -Verbose } | Should -Not -Throw
|
2018-03-09 14:02:51 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|