Skip to content

Commit 10acadc

Browse files
committed
Fix all DebugServiceTests
A number of items needed to be fixed: * `Path.Combine` instead of `Path.Join` because of .NET changes * `ConfigureAwait(false)` because of our rule to always include that * Pass actual script path to `BreakpointDetails.Create` so the debug service has a valid value for its hashtable key * Call `Close()` instead of `Dispose()` (which changed) on `PowerShellContextService` * Make assertion in `AssertDebuggerStopped` case-insensitive * Increase cancellation token source timeouts to 10 seconds * Avoid waiting for PowerShell context state change that never happens and isn't required * Delete unused fields or local variables * Fix incorrect assumption of breakpoint's index * Make `Get-Process` test cross-platform (and execute the right line)
1 parent 301ee69 commit 10acadc

File tree

2 files changed

+134
-186
lines changed

2 files changed

+134
-186
lines changed

test/PowerShellEditorServices.Test.Shared/Debugging/VariableTest.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function Test-Variables {
1515
$nullString = [NullString]::Value
1616
$psObjVar = New-Object -TypeName PSObject -Property @{Name = 'John'; Age = 75}
1717
$psCustomObjVar = [PSCustomObject] @{Name = 'Paul'; Age = 73}
18-
$procVar = Get-Process system
18+
$procVar = Get-Process -PID 0 # NOTE: PID 0 should always exist
1919
Write-Output "Done"
2020
}
2121

0 commit comments

Comments
 (0)