src/isFunction.test.js   A
last analyzed

Complexity

Total Complexity 7
Complexity/F 1

Size

Lines of Code 17
Function Count 7

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 7
eloc 11
mnd 0
bc 0
fnc 7
dl 0
loc 17
bpm 0
cpm 1
noi 0
c 0
b 0
f 0
rs 10
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
20
// it
21