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 ( 6049b4...82b9d9 )
by Vladimir
32s
created

index.test.js ➔ ... ➔ ???   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
c 2
b 0
f 0
nc 1
dl 0
loc 4
rs 10
nop 1
1
const router = require('./../../../src/routes/index');
2
3
describe('Index routes.', () => {
4
  test('GET homepage', (done) => {
5
    const request = {
6
      method: 'GET',
7
      url: '/',
8
    };
9
    const response = {
10
      redirect: (targetUrl) => {
11
        expect(targetUrl).toMatch(/.+/);
12
        done();
13
      },
14
    };
15
16
    router.handle(request, response);
17
  });
18
19
  test('GET page by streamId', (done) => {
20
    const request = {
21
      method: 'GET',
22
      url: '/testId',
23
    };
24
    const response = {
25
      render: (tpl, data) => {
26
        expect(tpl).toBe('index');
27
        expect(typeof data).toBe('object');
28
        done();
29
      },
30
    };
31
32
    router.handle(request, response);
33
  });
34
35
  test('POST to page by streamId', (done) => {
36
    const request = {
37
      method: 'POST',
38
      url: '/testId',
39
      headers: {
40
        'content-type': 'application/json',
41
      },
42
      connection: {
43
        socket: {
44
          remoteAddress: 'testIp',
45
        },
46
      },
47
      socket: {},
48
      body: 'RAW Body.',
49
    };
50
    const response = {
51
      status: jest.fn(),
0 ignored issues
show
Bug introduced by
The variable jest seems to be never declared. If this is a global, consider adding a /** global: jest */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
52
      send: jest.fn(),
53
    };
54
    global.socket = {
55
      emit: (type, data) => {
56
        expect(type).toBe('log');
57
        expect(typeof data).toBe('object');
58
        done();
59
      },
60
    };
61
62
    router.handle(request, response);
63
  });
64
});
65