Skip to content

Commit fab07eb

Browse files
committed
Use exception message
1 parent 6d90c7a commit fab07eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/Microsoft.PowerShell.ThreadJob.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,6 @@ Describe 'Job2 class API tests' -Tags 'CI' {
442442
$job = Start-ThreadJob -ScriptBlock { throw "My Job Error!" } | Wait-Job
443443
$results = $job | Receive-Job 2>&1
444444
$results | Should -Not -BeNullOrEmpty
445-
$results[0].ToString() | Should -Match "My Job Error!"
445+
$results[0].Exception.Message | Should -Be "My Job Error!"
446446
}
447447
}

0 commit comments

Comments
 (0)