Skip to content

Commit

Permalink
better test
Browse files Browse the repository at this point in the history
  • Loading branch information
trikko committed Jan 10, 2025
1 parent 773ad67 commit ebcdd76
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/parserino/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -1154,8 +1154,10 @@ struct Element
Element[] res = doc.bySelector("h4+ul li:nth-of-type(2), #this").array;

assert(res.length == 2);
assert(res[0].innerText == "two");
assert(res[1].innerText == "four");

auto elements = res.map!(x => x.innerText).array;
assert(elements.canFind("two"));
assert(elements.canFind("four"));
}

unittest
Expand Down

0 comments on commit ebcdd76

Please sign in to comment.