Skip to content

Commit 5b26071

Browse files
committed
ci: update PowerShell module versions in CI workflows
1 parent 0116c5e commit 5b26071

7 files changed

Lines changed: 29 additions & 29 deletions

File tree

‎.github/workflows/pwsh-ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Install and cache PowerShell modules
1919
uses: potatoqualitee/psmodulecache@v6.2.1
2020
with:
21-
modules-to-cache: InvokeBuild:5.14.23,InvokeBuildHelper::,PSScriptAnalyzer:1.25.0,Pester:5.7.1
21+
modules-to-cache: InvokeBuild:5.14.23,InvokeBuildHelper::,PSScriptAnalyzer:1.24.0,Pester:6.0.0
2222
updatable: true
2323

2424
- name: Build PowerShell module

‎.github/workflows/pwsh-release.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Install and cache PowerShell modules
2020
uses: potatoqualitee/psmodulecache@v6.2.1
2121
with:
22-
modules-to-cache: InvokeBuild:5.14.23,InvokeBuildHelper::,PSScriptAnalyzer:1.25.0,Pester:5.7.1
22+
modules-to-cache: InvokeBuild:5.14.23,InvokeBuildHelper::,PSScriptAnalyzer:1.24.0,Pester:6.0.0
2323
updatable: true
2424

2525
- name: Publish to GitHub Repository

‎ScriptLogger/Tests/Unit/Start-ScriptLogger.Tests.ps1‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ Describe 'Start-ScriptLogger' {
311311
Start-ScriptLogger -NoLogFile -NoEventLog
312312

313313
# Assert
314-
Assert-MockCalled 'Write-ScriptLoggerLog' -ParameterFilter { $Level -eq 'Verbose' -and $Message -eq 'PowerShell log started' } -Times 1
314+
Should-Invoke -CommandName 'Write-ScriptLoggerLog' -ParameterFilter { $Level -eq 'Verbose' -and $Message -eq 'PowerShell log started' } -Times 1
315315
}
316316
}
317317

@@ -324,7 +324,7 @@ Describe 'Start-ScriptLogger' {
324324
Stop-ScriptLogger
325325

326326
# Assert
327-
Assert-MockCalled 'Write-ScriptLoggerLog' -ParameterFilter { $Level -eq 'Verbose' -and $Message -eq 'PowerShell log stopped' } -Times 1
327+
Should-Invoke -CommandName 'Write-ScriptLoggerLog' -ParameterFilter { $Level -eq 'Verbose' -and $Message -eq 'PowerShell log stopped' } -Times 1
328328
}
329329
}
330330
}

‎ScriptLogger/Tests/Unit/Write-ErrorLog.Tests.ps1‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Describe 'Write-ErrorLog' {
2828
Write-ErrorLog -Message 'My Error'
2929

3030
# Assert
31-
Assert-MockCalled -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 1 -Exactly
31+
Should-Invoke -CommandName 'Write-ScriptLoggerLog' -Scope 'It' -Times 1 -Exactly
3232
}
3333
}
3434

@@ -47,7 +47,7 @@ Describe 'Write-ErrorLog' {
4747
}
4848

4949
# Assert
50-
Assert-MockCalled -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 1 -Exactly
50+
Should-Invoke -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 1 -Exactly
5151
}
5252
}
5353
It 'should invoke the mock twice for an array of 2 messages' {
@@ -58,7 +58,7 @@ Describe 'Write-ErrorLog' {
5858
Write-ErrorLog -Message 'My Error', 'My Error'
5959

6060
# Assert
61-
Assert-MockCalled -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 2 -Exactly
61+
Should-Invoke -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 2 -Exactly
6262
}
6363
}
6464

@@ -73,7 +73,7 @@ Describe 'Write-ErrorLog' {
7373
Write-ErrorLog -ErrorRecord $errorRecord, $errorRecord
7474

7575
# Assert
76-
Assert-MockCalled -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 2 -Exactly
76+
Should-Invoke -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 2 -Exactly
7777
}
7878
}
7979

@@ -85,7 +85,7 @@ Describe 'Write-ErrorLog' {
8585
'My Error', 'My Error', 'My Error' | Write-ErrorLog
8686

8787
# Assert
88-
Assert-MockCalled -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 3 -Exactly
88+
Should-Invoke -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 3 -Exactly
8989
}
9090
}
9191

@@ -100,7 +100,7 @@ Describe 'Write-ErrorLog' {
100100
$errorRecord, $errorRecord, $errorRecord | Write-ErrorLog
101101

102102
# Assert
103-
Assert-MockCalled -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 3 -Exactly
103+
Should-Invoke -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 3 -Exactly
104104
}
105105
}
106106
}
@@ -193,7 +193,7 @@ Describe 'Write-ErrorLog' {
193193
Write-ErrorLog -Message 'My Error'
194194

195195
# Assert
196-
Assert-MockCalled -Scope 'It' -CommandName 'Write-ScriptLoggerPlatformLog' -Times 1 -Exactly
196+
Should-Invoke -Scope 'It' -CommandName 'Write-ScriptLoggerPlatformLog' -Times 1 -Exactly
197197
}
198198
}
199199

@@ -215,7 +215,7 @@ Describe 'Write-ErrorLog' {
215215
}
216216

217217
# Assert
218-
Assert-MockCalled -Scope 'It' -CommandName 'Write-ScriptLoggerPlatformLog' -Times 1 -Exactly
218+
Should-Invoke -Scope 'It' -CommandName 'Write-ScriptLoggerPlatformLog' -Times 1 -Exactly
219219
}
220220
}
221221
}
@@ -241,7 +241,7 @@ Describe 'Write-ErrorLog' {
241241
Write-ErrorLog -Message 'My Error'
242242

243243
# Assert
244-
Assert-MockCalled -Scope 'It' -CommandName 'Write-Error' -Times 1 -Exactly
244+
Should-Invoke -Scope 'It' -CommandName 'Write-Error' -Times 1 -Exactly
245245
}
246246
}
247247

@@ -263,7 +263,7 @@ Describe 'Write-ErrorLog' {
263263
}
264264

265265
# Assert
266-
Assert-MockCalled -Scope 'It' -CommandName 'Write-Error' -Times 1 -Exactly
266+
Should-Invoke -Scope 'It' -CommandName 'Write-Error' -Times 1 -Exactly
267267
}
268268
}
269269
}

‎ScriptLogger/Tests/Unit/Write-InformationLog.Tests.ps1‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Describe 'Write-InformationLog' {
2828
Write-InformationLog -Message 'My Information'
2929

3030
# Assert
31-
Assert-MockCalled -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 1 -Exactly
31+
Should-Invoke -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 1 -Exactly
3232
}
3333
}
3434

@@ -40,7 +40,7 @@ Describe 'Write-InformationLog' {
4040
Write-InformationLog -Message 'My Information', 'My Information'
4141

4242
# Assert
43-
Assert-MockCalled -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 2 -Exactly
43+
Should-Invoke -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 2 -Exactly
4444
}
4545
}
4646

@@ -52,7 +52,7 @@ Describe 'Write-InformationLog' {
5252
'My Information', 'My Information', 'My Information' | Write-InformationLog
5353

5454
# Assert
55-
Assert-MockCalled -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 3 -Exactly
55+
Should-Invoke -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 3 -Exactly
5656
}
5757
}
5858
}
@@ -102,7 +102,7 @@ Describe 'Write-InformationLog' {
102102
Write-InformationLog -Message 'My Information'
103103

104104
# Assert
105-
Assert-MockCalled -Scope 'It' -CommandName 'Write-ScriptLoggerPlatformLog' -Times 1 -Exactly
105+
Should-Invoke -Scope 'It' -CommandName 'Write-ScriptLoggerPlatformLog' -Times 1 -Exactly
106106
}
107107
}
108108
}
@@ -128,7 +128,7 @@ Describe 'Write-InformationLog' {
128128
Write-InformationLog -Message 'My Information'
129129

130130
# Assert
131-
Assert-MockCalled -Scope 'It' -CommandName 'Write-Information' -Times 1 -Exactly
131+
Should-Invoke -Scope 'It' -CommandName 'Write-Information' -Times 1 -Exactly
132132
}
133133
}
134134
}

‎ScriptLogger/Tests/Unit/Write-VerboseLog.Tests.ps1‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Describe 'Write-VerboseLog' {
2828
Write-VerboseLog -Message 'My Verbose'
2929

3030
# Assert
31-
Assert-MockCalled -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 1 -Exactly
31+
Should-Invoke -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 1 -Exactly
3232
}
3333
}
3434

@@ -40,7 +40,7 @@ Describe 'Write-VerboseLog' {
4040
Write-VerboseLog -Message 'My Verbose', 'My Verbose'
4141

4242
# Assert
43-
Assert-MockCalled -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 2 -Exactly
43+
Should-Invoke -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 2 -Exactly
4444
}
4545
}
4646

@@ -52,7 +52,7 @@ Describe 'Write-VerboseLog' {
5252
'My Verbose', 'My Verbose', 'My Verbose' | Write-VerboseLog
5353

5454
# Assert
55-
Assert-MockCalled -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 3 -Exactly
55+
Should-Invoke -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 3 -Exactly
5656
}
5757
}
5858
}
@@ -102,7 +102,7 @@ Describe 'Write-VerboseLog' {
102102
Write-VerboseLog -Message 'My Verbose'
103103

104104
# Assert
105-
Assert-MockCalled -Scope 'It' -CommandName 'Write-ScriptLoggerPlatformLog' -Times 1 -Exactly
105+
Should-Invoke -Scope 'It' -CommandName 'Write-ScriptLoggerPlatformLog' -Times 1 -Exactly
106106
}
107107
}
108108
}
@@ -128,7 +128,7 @@ Describe 'Write-VerboseLog' {
128128
Write-VerboseLog -Message 'My Verbose'
129129

130130
# Assert
131-
Assert-MockCalled -Scope 'It' -CommandName 'Write-Verbose' -Times 1 -Exactly
131+
Should-Invoke -Scope 'It' -CommandName 'Write-Verbose' -Times 1 -Exactly
132132
}
133133
}
134134
}

‎ScriptLogger/Tests/Unit/Write-WarningLog.Tests.ps1‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Describe 'Write-WarningLog' {
2828
Write-WarningLog -Message 'My Warning'
2929

3030
# Assert
31-
Assert-MockCalled -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 1 -Exactly
31+
Should-Invoke -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 1 -Exactly
3232
}
3333
}
3434

@@ -40,7 +40,7 @@ Describe 'Write-WarningLog' {
4040
Write-WarningLog -Message 'My Warning', 'My Warning'
4141

4242
# Assert
43-
Assert-MockCalled -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 2 -Exactly
43+
Should-Invoke -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 2 -Exactly
4444
}
4545
}
4646

@@ -52,7 +52,7 @@ Describe 'Write-WarningLog' {
5252
'My Warning', 'My Warning', 'My Warning' | Write-WarningLog
5353

5454
# Assert
55-
Assert-MockCalled -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 3 -Exactly
55+
Should-Invoke -Scope 'It' -CommandName 'Write-ScriptLoggerLog' -Times 3 -Exactly
5656
}
5757
}
5858
}
@@ -102,7 +102,7 @@ Describe 'Write-WarningLog' {
102102
Write-WarningLog -Message 'My Warning'
103103

104104
# Assert
105-
Assert-MockCalled -Scope 'It' -CommandName 'Write-ScriptLoggerPlatformLog' -Times 1 -Exactly
105+
Should-Invoke -Scope 'It' -CommandName 'Write-ScriptLoggerPlatformLog' -Times 1 -Exactly
106106
}
107107
}
108108
}
@@ -128,7 +128,7 @@ Describe 'Write-WarningLog' {
128128
Write-WarningLog -Message 'My Warning'
129129

130130
# Assert
131-
Assert-MockCalled -Scope 'It' -CommandName 'Write-Warning' -Times 1 -Exactly
131+
Should-Invoke -Scope 'It' -CommandName 'Write-Warning' -Times 1 -Exactly
132132
}
133133
}
134134
}

0 commit comments

Comments
 (0)