File tree 1 file changed +27
-1
lines changed
test/PowerShellEditorServices.Test.E2E
1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change 1
- // Copyright (c) Microsoft Corporation.
1
+ // Copyright (c) Microsoft Corporation.
2
2
// Licensed under the MIT License.
3
3
4
4
using System ;
@@ -294,5 +294,31 @@ public async Task CanLaunchScriptWithCommentedLastLineAsync()
294
294
295
295
Assert . Collection ( GetLog ( ) , ( i ) => Assert . Equal ( "a log statement" , i ) ) ;
296
296
}
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 ( 2000 ) . ConfigureAwait ( false ) ;
320
+
321
+ Assert . Collection ( GetLog ( ) , ( i ) => Assert . Equal ( "works" , i ) ) ;
322
+ }
297
323
}
298
324
}
You can’t perform that action at this time.
0 commit comments