Expect all values in an array to be greater than 30 I've given an array of elements and need to check that every single text is a number greater than 30. Sample input data:

&lt;ul class="data-list"&gt;
    &lt;li class="data-item"&gt;40&lt;/li&gt;
    &lt;li class="data-item"&gt;31&lt;/li&gt;
    &lt;li class="data-item"&gt;32&lt;/li&gt;
    &lt;li class="data-item"&gt;101&lt;/li&gt;
&lt;/ul&gt;


Currently, I'm using .each() function to process every element one by one and then parseInt() and toBeGreaterThan() jasmine matcher:

var dataItems = element.all(by.css("ul.data-list &gt; li.data-item"));
dataItems.each(function (elm) {
     elm.getText().then(function (text) {
         expect(parseInt(text)).toBeGreaterThan(30);
     });
});


Is there a simpler or better way to address the problem? Would it be appropriate to first map() into an array of integers and then apply the matcher to every element of an array?

What I am a bit concerned about in using the current approach is that it would fail at the very first element that is less than or equal to 30 preventing us to see what other values of an array are.
Array::some can be used to reverse the test logic and return earlier.