Total Complexity | 2 |
Complexity/F | 1 |
Lines of Code | 17 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | const xPoweredBy = require('./../../../../src/middlewares/xPoweredBy'); |
||
2 | |||
3 | describe('X-Powered-By middleware.', () => { |
||
4 | test('Main test', () => { |
||
5 | /** global: jest */ |
||
6 | |||
7 | const cb = jest.fn(); |
||
8 | const res = { |
||
9 | removeHeader: jest.fn(), |
||
10 | }; |
||
11 | |||
12 | xPoweredBy({}, res, cb); |
||
13 | |||
14 | expect(res.removeHeader).toHaveBeenCalled(); |
||
15 | expect(cb).toHaveBeenCalled(); |
||
16 | }); |
||
17 | }); |
||
18 |