Skip to content

Commit

Permalink
🔖 v3.0.1
Browse files Browse the repository at this point in the history
Auto build
  • Loading branch information
Xotic750 committed Jul 16, 2019
1 parent 83ac1e9 commit 74ef352
Show file tree
Hide file tree
Showing 6 changed files with 182 additions and 175 deletions.
9 changes: 9 additions & 0 deletions __tests__/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
rules: {
'jest/no-hooks': 'off',
'no-void': 'off',
'lodash/prefer-noop': 'off',
'compat/compat': 'off',
'prefer-rest-params': 'off',
},
};
12 changes: 5 additions & 7 deletions __tests__/find-index-x.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const itHasDoc = typeof document !== 'undefined' && document ? it : xit;

describe('findIndex', function() {
let list;
/* eslint-disable-next-line jest/no-hooks */

beforeEach(function() {
list = [5, 10, 15, 20];
});
Expand All @@ -16,7 +16,6 @@ describe('findIndex', function() {
}).toThrowErrorMatchingSnapshot();

expect(function() {
/* eslint-disable-next-line no-void */
findIndex(void 0);
}).toThrowErrorMatchingSnapshot();

Expand Down Expand Up @@ -112,7 +111,7 @@ describe('findIndex', function() {
it('should work with a sparse array', function() {
expect.assertions(3);
// noinspection JSConsecutiveCommasInArrayLiteral
const obj = [1, , void 0]; /* eslint-disable-line no-void,no-sparse-arrays */
const obj = [1, , void 0]; /* eslint-disable-line no-sparse-arrays */
expect(1 in obj).toBe(false);
const seen = [];
const foundIndex = findIndex(obj, function(item, idx) {
Expand All @@ -121,15 +120,15 @@ describe('findIndex', function() {
return typeof item === 'undefined' && idx === 2;
});
expect(foundIndex).toBe(2);
/* eslint-disable-next-line no-void */

expect(seen).toStrictEqual([[0, 1], [1, void 0], [2, void 0]]);
});

it('should work with a sparse array-like object', function() {
expect.assertions(2);
const obj = {
0: 1,
/* eslint-disable-next-line no-void */

2: void 0,
length: 3.2,
};
Expand All @@ -142,7 +141,7 @@ describe('findIndex', function() {
});

expect(foundIndex).toBe(-1);
/* eslint-disable-next-line no-void */

expect(seen).toStrictEqual([[0, 1], [1, void 0], [2, void 0]]);
});

Expand All @@ -162,7 +161,6 @@ describe('findIndex', function() {
it('should work with arguments', function() {
expect.assertions(2);
const obj = (function() {
/* eslint-disable-next-line prefer-rest-params */
return arguments;
})('a', 'b', 'c');

Expand Down
4 changes: 2 additions & 2 deletions dist/find-index-x.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/find-index-x.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 74ef352

Please sign in to comment.