GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 043e72...5d2753 )
by Benjamin
06:48 queued 02:54
created

test/util/getCurrentRecords.test.js   A

Complexity

Total Complexity 4
Complexity/F 1

Size

Lines of Code 59
Function Count 4

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 0
wmc 4
c 2
b 0
f 0
nc 1
mnd 0
bc 4
fnc 4
dl 0
loc 59
rs 10
bpm 1
cpm 1
noi 0
1
import expect from 'expect';
2
import { getCurrentRecords } from './../../src/util/getCurrentRecords';
3
4
describe('getCurrentRecords utility function', () => {
5
6
    const dataSource = {
7
        data: [
8
            {
9
                test: 'test'
10
            },
11
            {
12
                test: 'test'
13
            },
14
            {
15
                test: 'test'
16
            },
17
            {
18
                test: 'test'
19
            },
20
            {
21
                test: 'test'
22
            },
23
            {
24
                test: 'test'
25
            },
26
            {
27
                test: 'test'
28
            },
29
            {
30
                test: 'test'
31
            },
32
            {
33
                test: 'test'
34
            },
35
            {
36
                test: 'test'
37
            },
38
            {
39
                test: 'test'
40
            }
41
        ]
42
    };
43
44
    it('Should return the correct set of records', () => {
45
        expect(getCurrentRecords(dataSource, 0, 5)).toBeTruthy();
46
    });
47
48
    it('Should return the correct page size', () => {
49
        expect(getCurrentRecords(dataSource, 0, 5).length).toEqual(5);
50
        expect(getCurrentRecords(dataSource, 0, 7).length).toEqual(7);
51
        expect(getCurrentRecords(dataSource, 0, 2).length).toEqual(2);
52
    });
53
54
    it('Should return null', () => {
55
        expect(getCurrentRecords(false, 0, 5))
56
            .toEqual(null);
57
    });
58
59
});
60