Skip to content

Commit 23f060c

Browse files
authored
Add tests for OffsetInspect module manifest and exports
1 parent a2a9fad commit 23f060c

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

tests/OffsetInspect.Tests.ps1

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
$moduleRoot = Join-Path $PSScriptRoot '..'
2+
$manifest = Join-Path $moduleRoot 'OffsetInspect.psd1'
3+
4+
Describe 'OffsetInspect module manifest' {
5+
It 'has a valid manifest' {
6+
{ Test-ModuleManifest -Path $manifest } | Should -Not -Throw
7+
}
8+
It 'has expected module version' {
9+
$m = Test-ModuleManifest -Path $manifest
10+
$m.Version.ToString() | Should -Be '1.0.1'
11+
}
12+
}
13+
14+
Describe 'OffsetInspect exports' {
15+
BeforeAll {
16+
Import-Module $manifest -Force
17+
}
18+
19+
It 'exports Invoke-OffsetInspect' {
20+
$cmd = Get-Command Invoke-OffsetInspect -Module OffsetInspect -ErrorAction Stop
21+
$cmd | Should -Not -BeNullOrEmpty
22+
}
23+
24+
It 'FilePaths is a string array parameter' {
25+
$cmd = Get-Command Invoke-OffsetInspect -Module OffsetInspect
26+
$cmd.Parameters['FilePaths'].ParameterType | Should -Be ([string[]])
27+
}
28+
29+
It 'OffsetInputs is a string array parameter' {
30+
$cmd = Get-Command Invoke-OffsetInspect -Module OffsetInspect
31+
$cmd.Parameters['OffsetInputs'].ParameterType | Should -Be ([string[]])
32+
}
33+
}

0 commit comments

Comments
 (0)