undefined is not a constructor
<p>I am using rails 4, capybara, poltergeist to test my rails 4 + angularjs app. In my angular app, there is a place I have the below code in my directive controller.</p>

<pre><code>var audience = [someObject1, someObject2, someObject3].findIndex(function(object) {
  return object.id === 1;
});
</code></pre>

<p>I got the following error during test</p>

<pre><code>Error: undefined is not a constructor (evaluating '[1,2,3].findIndex(function(v) { return v === 1; })')
</code></pre>

<p>actually it won't even allow me to have something like this</p>

<pre><code>[1, 2, 3].findIndex(function(v) {
  return v === 1;
});
</code></pre>

<p>anyone knows why poltergeist doesn't like the <code>find</code> and <code>findIndex</code> method of Javascript?</p>