File: test.js

package info (click to toggle)
node-array-find-index 1.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 112 kB
  • sloc: makefile: 2
file content (13 lines) | stat: -rw-r--r-- 256 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
/* eslint-disable no-extend-native */
const test = require('tape');

Array.prototype.findIndex = undefined;
const m = require('./');

const f = [10, 20, 30, 40];

test(t => {
	t.is(m(f, x => x === 30), 2);
	t.is(m(f, x => x === 'noop'), -1);
	t.end();
});