Open jme783 opened 9 years ago
@jme783 There isn't, but I'll mark this as a feature request, as I think that's a good idea.
@bantic Sounds good, for the time being I created a single wrapper around my list of objects that only would be present if there were items returned.
I've done this for "at least 1" for expectComponent
in commit bb3b2449c39f1fe3019c9ab5b5b0d8eb46311987
I'd suggest you create a PR mirroring my fixes and new tests for expectElement
, and add an options
object with { comparison: "equals" | "atLeast" | "atMost" }
where default is equals
Maybe I'm missing something, but is it possible to use the
expectElement
method to test if there is at least a certain number of elements, instead of exactly the number of elements defined incount
? I want to test that a list of models are returned, but I'm not sure how many will be there.Thanks!