| Total Complexity | 7 |
| Complexity/F | 1 |
| Lines of Code | 17 |
| Function Count | 7 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | /* eslint-env jest */ |
||
| 2 | import isFunction from './isFunction' |
||
| 3 | |||
| 4 | it('isFunction is a function', () => { |
||
| 5 | expect(isFunction(isFunction)).toBeTruthy() |
||
| 6 | }) |
||
| 7 | it('Arrow function is a function', () => { |
||
| 8 | expect(isFunction(() => null)).toBeTruthy() |
||
| 9 | }) |
||
| 10 | it('Is a function', () => { |
||
| 11 | expect(isFunction(function () {})).toBeTruthy() |
||
| 12 | }) |
||
| 13 | it('Object is not a function', () => { |
||
| 14 | expect(isFunction({})).toBeFalsy() |
||
| 15 | }) |
||
| 16 | it('Primitive is not a function', () => { |
||
| 17 | expect(isFunction(1)).toBeFalsy() |
||
| 18 | }) |
||
| 19 | |||
| 21 |