In bUnit how do I verify an element does not exist

168 views Asked by At

I have the following code:

var li = renderedComponent.Find("li.validation-message");
Assert.Null(li);

The Find() call is throwing an exception instead of returning null. And HasComponent<>() needs a type. It's not clear what type to put in that.

0

There are 0 answers