File tree Expand file tree Collapse file tree 2 files changed +30
-2
lines changed
test/PowerShellEditorServices.Test.E2E Expand file tree Collapse file tree 2 files changed +30
-2
lines changed Original file line number Diff line number Diff line change 88 displayName : PowerShell version
99 inputs :
1010 targetType : inline
11- script : $PSVersionTable
11+ script : |
12+ $PSVersionTable
13+ Get-Module -ListAvailable Pester
1214 pwsh : ${{ parameters.pwsh }}
1315
1416- task : UseDotNet@2
Original file line number Diff line number Diff line change 1- // Copyright (c) Microsoft Corporation.
1+ // Copyright (c) Microsoft Corporation.
22// Licensed under the MIT License.
33
44using System ;
@@ -294,5 +294,31 @@ public async Task CanLaunchScriptWithCommentedLastLineAsync()
294294
295295 Assert . Collection ( GetLog ( ) , ( i ) => Assert . Equal ( "a log statement" , i ) ) ;
296296 }
297+
298+ [ Fact ]
299+ public async Task CanRunPesterTestFile ( )
300+ {
301+ string logStatement = GenerateScriptFromLoggingStatements ( "works" ) ;
302+ string filePath = NewTestFile ( @"
303+ Describe 'A' {
304+ Context 'B' {
305+ It 'C' {
306+ throw 'error'
307+ }
308+ It 'D' {
309+ " + logStatement + @"
310+ }
311+ }
312+ }
313+ " ) ;
314+
315+ await PsesDebugAdapterClient . LaunchScript ( filePath , Started ) . ConfigureAwait ( false ) ;
316+
317+ ConfigurationDoneResponse configDoneResponse = await PsesDebugAdapterClient . RequestConfigurationDone ( new ConfigurationDoneArguments ( ) ) . ConfigureAwait ( false ) ;
318+ Assert . NotNull ( configDoneResponse ) ;
319+ await Task . Delay ( 5000 ) . ConfigureAwait ( false ) ;
320+
321+ Assert . Collection ( GetLog ( ) , ( i ) => Assert . Equal ( "works" , i ) ) ;
322+ }
297323 }
298324}
You can’t perform that action at this time.
0 commit comments