e-last-index-of.js 478 B

123456789101112
  1. 'use strict';
  2. module.exports = function (t, a) {
  3. var x = {};
  4. a(t.call([3, 'raz', {}, x, {}, x], x), 5, "Regular");
  5. a(t.call([3, 'raz', NaN, {}, x], NaN), 2, "NaN");
  6. a(t.call([3, 'raz', 0, {}, -0], -0), 4, "-0");
  7. a(t.call([3, 'raz', -0, {}, 0], +0), 4, "+0");
  8. a(t.call([3, 'raz', NaN, {}, NaN], NaN, 3), 2, "fromIndex");
  9. a(t.call([3, 'raz', NaN, 2, NaN], NaN, -1), 4, "Negative fromIndex #1");
  10. a(t.call([3, 'raz', NaN, 2, NaN], NaN, -2), 2, "Negative fromIndex #2");
  11. };