Skip to content

Commit 26a7f10

Browse files
committed
test: 补充单元测试
1 parent b012915 commit 26a7f10

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/UnitTest/Components/DrawerTest.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,14 @@ public void BodyScroll_Ok()
207207
cut.Contains("data-bb-scroll=\"true\"");
208208
}
209209

210+
[Fact]
211+
public async Task Close_Ok()
212+
{
213+
Context.JSInterop.Setup<bool>("execute", matcher => true).SetResult(true);
214+
var cut = Context.RenderComponent<Drawer>();
215+
await cut.InvokeAsync(() => cut.Instance.Close());
216+
}
217+
210218
class MockContent : ComponentBase
211219
{
212220
[CascadingParameter(Name = "BodyContext")]

0 commit comments

Comments
 (0)