Skip to content

Commit 53bd554

Browse files
committed
test: 增加防抖单元测试
1 parent 455d962 commit 53bd554

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/UnitTest/Components/AutoCompleteTest.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ public void Items_Ok()
3333
Assert.Equal(2, menus.Count);
3434
}
3535

36+
[Fact]
37+
public void Debounce_Ok()
38+
{
39+
var cut = Context.RenderComponent<AutoComplete>();
40+
Assert.DoesNotContain("data-bb-debounce", cut.Markup);
41+
42+
cut.SetParametersAndRender(pb => pb.Add(a => a.Debounce, 100));
43+
cut.Contains("data-bb-debounce=\"100\"");
44+
}
45+
3646
[Fact]
3747
public async Task OnCustomFilter_Test()
3848
{

0 commit comments

Comments
 (0)