wip: code formatting nits continued

This commit is contained in:
jdalton
2023-09-16 22:59:56 -07:00
parent 0b28b7f7b6
commit b5c59317ea
421 changed files with 7354 additions and 9005 deletions

21
test/isLength.spec.js Normal file
View File

@@ -0,0 +1,21 @@
import lodashStable from 'lodash';
import { MAX_SAFE_INTEGER, stubTrue, stubFalse } from './utils';
import isLength from '../src/isLength';
describe('isLength', () => {
it('should return `true` for lengths', () => {
const values = [0, 3, MAX_SAFE_INTEGER];
const expected = lodashStable.map(values, stubTrue);
const actual = lodashStable.map(values, isLength);
expect(actual).toEqual(expected);
});
it('should return `false` for non-lengths', () => {
const values = [-1, '1', 1.1, MAX_SAFE_INTEGER + 1];
const expected = lodashStable.map(values, stubFalse);
const actual = lodashStable.map(values, isLength);
expect(actual).toEqual(expected);
});
});