Skip to content

Commit b46fc08

Browse files
committed
fix: move Find into WaitForAssertion to avoid test failing on multi core
1 parent 910590f commit b46fc08

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

tests/bunit.core.tests/Rendering/TestRendererTest.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,7 @@ public void Test101()
342342
var cut = RenderComponent<AsyncRenderOfSubComponentDuringInit>(parameters =>
343343
parameters.Add(p => p.EitherOr, Task.Delay(1)));
344344

345-
var h1 = cut.Find("h1");
346-
cut.WaitForAssertion(() => h1.TextContent.ShouldBe("SECOND"));
345+
cut.WaitForAssertion(() => cut.Find("h1").TextContent.ShouldBe("SECOND"));
347346
}
348347

349348
[Fact(DisplayName = "Can render component that awaits completed task in OnInitializedAsync")]

0 commit comments

Comments
 (0)