Skip to content

Commit e7d912a

Browse files
Fix CI: replace Out-Null with $null assignment, add per-function test files, fix zip terminology for textlint
1 parent eb3e3e5 commit e7d912a

4 files changed

Lines changed: 50 additions & 3 deletions

File tree

src/functions/private/Install-TukuiAddon.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Downloads and installs a Tukui addon to the WoW AddOns folder.
55
66
.DESCRIPTION
7-
Downloads the zip from the Tukui API, extracts it, removes old addon
7+
Downloads the ZIP archive from the Tukui API, extracts it, removes old addon
88
folders, and copies the new ones into place. Uses a temporary directory
99
that is cleaned up automatically.
1010
@@ -30,7 +30,7 @@
3030
if (Test-Path $tempDir) {
3131
Remove-Item $tempDir -Recurse -Force
3232
}
33-
New-Item -ItemType Directory -Path $tempDir | Out-Null
33+
$null = New-Item -ItemType Directory -Path $tempDir
3434

3535
# Download
3636
$zipPath = Join-Path -Path $tempDir -ChildPath "$($Addon.Slug)-$($Addon.Version).zip"

src/functions/public/Install-ElvUI.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Downloads and installs ElvUI to the WoW AddOns folder.
55
66
.DESCRIPTION
7-
Fetches the latest ElvUI release from the Tukui API, downloads the zip archive,
7+
Fetches the latest ElvUI release from the Tukui API, downloads the ZIP archive,
88
and installs it to the World of Warcraft AddOns directory. Any existing ElvUI
99
folders are removed before the new version is copied into place.
1010

tests/Install-ElvUI.Tests.ps1

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
2+
'PSReviewUnusedParameter', '',
3+
Justification = 'Required for Pester tests'
4+
)]
5+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
6+
'PSUseDeclaredVarsMoreThanAssignments', '',
7+
Justification = 'Required for Pester tests'
8+
)]
9+
[CmdletBinding()]
10+
param()
11+
12+
Describe 'Install-ElvUI' {
13+
It 'Should be available' {
14+
Get-Command Install-ElvUI -ErrorAction SilentlyContinue | Should -Not -BeNullOrEmpty
15+
}
16+
It 'Should have WoWPath parameter' {
17+
(Get-Command Install-ElvUI).Parameters.ContainsKey('WoWPath') | Should -BeTrue
18+
}
19+
It 'Should have Flavor parameter' {
20+
(Get-Command Install-ElvUI).Parameters.ContainsKey('Flavor') | Should -BeTrue
21+
}
22+
}

tests/Update-ElvUI.Tests.ps1

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
2+
'PSReviewUnusedParameter', '',
3+
Justification = 'Required for Pester tests'
4+
)]
5+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
6+
'PSUseDeclaredVarsMoreThanAssignments', '',
7+
Justification = 'Required for Pester tests'
8+
)]
9+
[CmdletBinding()]
10+
param()
11+
12+
Describe 'Update-ElvUI' {
13+
It 'Should be available' {
14+
Get-Command Update-ElvUI -ErrorAction SilentlyContinue | Should -Not -BeNullOrEmpty
15+
}
16+
It 'Should have WoWPath parameter' {
17+
(Get-Command Update-ElvUI).Parameters.ContainsKey('WoWPath') | Should -BeTrue
18+
}
19+
It 'Should have Flavor parameter' {
20+
(Get-Command Update-ElvUI).Parameters.ContainsKey('Flavor') | Should -BeTrue
21+
}
22+
It 'Should have Force parameter' {
23+
(Get-Command Update-ElvUI).Parameters.ContainsKey('Force') | Should -BeTrue
24+
}
25+
}

0 commit comments

Comments
 (0)