File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,6 @@ public Task DisposeComponents()
235235 } ) ;
236236
237237 rootComponents . Clear ( ) ;
238- AssertNoUnhandledExceptions ( ) ;
239238 }
240239
241240 return returnTask ;
Original file line number Diff line number Diff line change @@ -30,13 +30,15 @@ public async Task Test102()
3030 callStack . Count . ShouldBe ( 2 ) ;
3131 }
3232
33- [ Fact ( DisplayName = "DisposeComponents rethrows exceptions from Dispose methods in components " ) ]
33+ [ Fact ( DisplayName = "DisposeComponents captures exceptions from Dispose in Renderer.UnhandledException " ) ]
3434 public async Task Test103 ( )
3535 {
3636 Render < ThrowExceptionComponent > ( ) ;
37- Func < Task > action = ( ) => DisposeComponentsAsync ( ) ;
37+
38+ await DisposeComponentsAsync ( ) ;
3839
39- await action . ShouldThrowAsync < NotSupportedException > ( ) ;
40+ var actual = await Renderer . UnhandledException ;
41+ actual . ShouldBeAssignableTo < NotSupportedException > ( ) ;
4042 }
4143
4244 [ Fact ( DisplayName = "DisposeComponents disposes components nested in render fragments" ) ]
You can’t perform that action at this time.
0 commit comments