@@ -11,21 +11,34 @@ public class ElectronFixture : IAsyncLifetime
1111
1212 public async Task InitializeAsync ( )
1313 {
14- AppDomain . CurrentDomain . SetData ( "ElectronTestAssembly" , Assembly . GetExecutingAssembly ( ) ) ;
15- var runtimeController = ElectronNetRuntime . RuntimeController ;
16- await runtimeController . Start ( ) ;
17- await runtimeController . WaitReadyTask ;
18-
19- // create hidden window for tests (avoid showing UI)
20- this . MainWindow = await Electron . WindowManager . CreateWindowAsync ( new BrowserWindowOptions
14+ try
2115 {
22- Show = false ,
23- Width = 800 ,
24- Height = 600 ,
25- } , "about:blank" ) ;
16+ Console . Error . WriteLine ( "InitializeAsync" ) ;
17+ AppDomain . CurrentDomain . SetData ( "ElectronTestAssembly" , Assembly . GetExecutingAssembly ( ) ) ;
18+ Console . Error . WriteLine ( "InitializeAsync 1" ) ;
19+ var runtimeController = ElectronNetRuntime . RuntimeController ;
20+ Console . Error . WriteLine ( "InitializeAsync 2" ) ;
21+ await runtimeController . Start ( ) ;
22+ Console . Error . WriteLine ( "InitializeAsync 3" ) ;
23+ await runtimeController . WaitReadyTask ;
24+ Console . Error . WriteLine ( "InitializeAsync 4" ) ;
2625
27- // Clear potential cache side-effects
28- await this . MainWindow . WebContents . Session . ClearCacheAsync ( ) ;
26+ // create hidden window for tests (avoid showing UI)
27+ this . MainWindow = await Electron . WindowManager . CreateWindowAsync ( new BrowserWindowOptions
28+ {
29+ Show = false ,
30+ Width = 800 ,
31+ Height = 600 ,
32+ } , "about:blank" ) ;
33+
34+ // Clear potential cache side-effects
35+ await this . MainWindow . WebContents . Session . ClearCacheAsync ( ) ;
36+ }
37+ catch ( Exception ex )
38+ {
39+ Console . WriteLine ( ex ) ;
40+ throw ;
41+ }
2942 }
3043
3144 public async Task DisposeAsync ( )
0 commit comments