Skip to content

Commit 4b149e4

Browse files
kalgizdaxian-dbw
authored andcommitted
Use new Pester syntax for Pester tests in module PSDesiredStateConfiguration (#6622)
1 parent 045e036 commit 4b149e4

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

test/powershell/Modules/PSDesiredStateConfiguration/MOF-Compilation.Tests.ps1

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ Describe "DSC MOF Compilation" -tags "CI" {
2727
}
2828
2929
DSCTestConfig -OutputPath TestDrive:\DscTestConfig1
30-
"@) | should not throw
30+
"@) | Should -Not -Throw
3131

32-
"TestDrive:\DscTestConfig1\localhost.mof" | Should Exist
32+
"TestDrive:\DscTestConfig1\localhost.mof" | Should -Exist
3333
}
3434

3535
It "Should be able to compile a MOF from another basic configuration" -Skip:($IsMacOS -or $IsWindows) {
@@ -49,9 +49,9 @@ Describe "DSC MOF Compilation" -tags "CI" {
4949
}
5050
5151
DSCTestConfig -OutputPath TestDrive:\DscTestConfig2
52-
"@) | should not throw
52+
"@) | Should -Not -Throw
5353

54-
"TestDrive:\DscTestConfig2\localhost.mof" | Should Exist
54+
"TestDrive:\DscTestConfig2\localhost.mof" | Should -Exist
5555
}
5656

5757
It "Should be able to compile a MOF from a complex configuration" -Skip:($IsMacOS -or $IsWindows) {
@@ -158,9 +158,9 @@ Describe "DSC MOF Compilation" -tags "CI" {
158158
159159
}
160160
WordPressServer -OutputPath TestDrive:\DscTestConfig3
161-
"@) | should not throw
161+
"@) | Should -Not -Throw
162162

163-
"TestDrive:\DscTestConfig3\CentOS.mof" | Should Exist
163+
"TestDrive:\DscTestConfig3\CentOS.mof" | Should -Exist
164164
}
165165

166166
It "Should be able to compile a MOF from a basic configuration on Windows" -Skip:($IsMacOS -or $IsLinux) {
@@ -178,9 +178,9 @@ Describe "DSC MOF Compilation" -tags "CI" {
178178
}
179179
180180
DSCTestConfig -OutputPath TestDrive:\DscTestConfig4
181-
"@) | should not throw
181+
"@) | Should -Not -Throw
182182

183-
"TestDrive:\DscTestConfig4\localhost.mof" | Should Exist
183+
"TestDrive:\DscTestConfig4\localhost.mof" | Should -Exist
184184
}
185185

186186
It "Should be able to compile a MOF from a configuration with multiple resources on Windows" -Skip:($IsMacOS -or $IsLinux) {
@@ -208,8 +208,8 @@ Describe "DSC MOF Compilation" -tags "CI" {
208208
}
209209
210210
DSCTestConfig -OutputPath TestDrive:\DscTestConfig5
211-
"@) | should not throw
211+
"@) | Should -Not -Throw
212212

213-
"TestDrive:\DscTestConfig5\localhost.mof" | Should Exist
213+
"TestDrive:\DscTestConfig5\localhost.mof" | Should -Exist
214214
}
215215
}

0 commit comments

Comments
 (0)