Skip to content
Merged
Show file tree
Hide file tree
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
Prev Previous commit
Next Next commit
test
  • Loading branch information
MariusStorhaug committed Mar 27, 2024
commit 1f45c7bd8b462cb110c8373d2444c38a4cce2ef0
13 changes: 9 additions & 4 deletions scripts/helpers/Test-PSModule.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function Test-PSModule {
Data = @{
Path = $Path
SettingsFilePath = Join-Path $PSSATestsPath 'PSScriptAnalyzer.Tests.psd1'
Verbose = $true
}
}
Write-Verbose 'ContainerParams:'
Expand All @@ -57,7 +58,8 @@ function Test-PSModule {
$containerParams = @{
Path = Join-Path -Path $env:GITHUB_ACTION_PATH -ChildPath 'scripts\tests\PSModule\Common.Tests.ps1'
Data = @{
Path = $Path
Path = $Path
Verbose = $true
}
}
Write-Verbose 'ContainerParams:'
Expand All @@ -72,7 +74,8 @@ function Test-PSModule {
$containerParams = @{
Path = Join-Path -Path $env:GITHUB_ACTION_PATH -ChildPath 'scripts\tests\PSModule\Module.Tests.ps1'
Data = @{
Path = $Path
Path = $Path
Verbose = $true
}
}
Write-Verbose 'ContainerParams:'
Expand All @@ -88,7 +91,8 @@ function Test-PSModule {
$containerParams = @{
Path = Join-Path -Path $env:GITHUB_ACTION_PATH -ChildPath 'scripts\tests\PSModule\SourceCode.Tests.ps1'
Data = @{
Path = $Path
Path = $Path
Verbose = $true
}
}
Write-Verbose 'ContainerParams:'
Expand All @@ -105,7 +109,8 @@ function Test-PSModule {
$containerParams = @{
Path = $moduleTestsPath
Data = @{
Path = $Path
Path = $Path
Verbose = $true
}
}
Write-Verbose 'ContainerParams:'
Expand Down
4 changes: 4 additions & 0 deletions scripts/tests/PSModule/Module.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ Param(
)

BeforeAll {
[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
'PSUseDeclaredVarsMoreThanAssignments', 'moduleName',
Justification = 'moduleName is used in the test.'
)]
$moduleName = Split-Path -Path $Path -Leaf
}

Expand Down