| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | const cors = require('./../../../src/middlewares/cors'); |
||
| 3 | describe('CORS middleware.', () => { |
||
| 4 | test('Main test', () => { |
||
| 5 | const cb = jest.fn(); |
||
|
|
|||
| 6 | const res = { |
||
| 7 | header: jest.fn(), |
||
| 8 | }; |
||
| 9 | |||
| 10 | cors({}, res, cb); |
||
| 11 | |||
| 12 | expect(res.header.mock.calls.length).toBe(2); |
||
| 13 | expect(cb).toHaveBeenCalled(); |
||
| 14 | }); |
||
| 15 | }); |
||
| 16 |
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.