.slice(begin[, end]) => WrapperReturns a new wrapper with a subset of the nodes of the original wrapper, according to the rules of Array.prototype.slice.
Currently:
wrapper.find(Component).forEach((item, index) => {
if (index < 2) return;
// Assertions
});
This would be a nice addition:
wrapper.find(Component).slice(2).forEach((item, index) => {
// Assertions
});
I like it. This seems straightforward, as long as it conforms to Array#slice.
I'd be happy to submit a PR for this when I get some time this weekend.
Most helpful comment
I'd be happy to submit a PR for this when I get some time this weekend.