File: test.js

package info (click to toggle)
node-array-find-index 1.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 100 kB
  • ctags: 3
  • sloc: makefile: 2; sh: 2
file content (12 lines) | stat: -rw-r--r-- 240 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
/* eslint-disable no-extend-native */
import test from 'ava';

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);
});