Skip to content

🩹 [Patch]: Move module import test to general tests #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Test module ava
  • Loading branch information
MariusStorhaug committed Apr 13, 2024
commit 016a05e557210a8f18ead361bfb88a1353479c20
13 changes: 10 additions & 3 deletions scripts/tests/PSModule/Module.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ BeforeAll {
}

Describe 'PSModule - Module tests' {
Context 'Module' {
It 'The module should be available' {
Get-Module -Name $moduleName -ListAvailable | Should -Not -BeNullOrEmpty
Write-Verbose (Get-Module -Name $moduleName -ListAvailable | Out-String) -Verbose
}
It 'The module should be importable' {
{ Import-Module -Name $moduleName -Verbose -RequiredVersion 999.0.0 -Force } | Should -Not -Throw
}
}

Context "Module Manifest" {
BeforeAll {
$moduleManifestPath = Join-Path -Path $Path -ChildPath "$moduleName.psd1"
Expand All @@ -37,7 +47,4 @@ Describe 'PSModule - Module tests' {
# It 'has a valid icon URL' {}
# It 'has a valid help URL' {}
}
# Context "Root module file" {
# It 'has a root module file' {}
# }
}