fixes errorHandler tests

This commit is contained in:
James
2020-08-20 09:16:50 -04:00
parent c91f4d9e0d
commit 5802011eea

View File

@@ -4,9 +4,14 @@ const APIError = require('../../errors/APIError');
const testError = new APIError('test error', 503);
const mockResponse = () => {
const res = {};
const res = {
status: jest.fn(),
send: jest.fn(),
};
jest.spyOn(res, 'status').mockImplementation()
.mockReturnValue(res);
jest.spyOn(res, 'send').mockImplementation()
.mockReturnValue(res);
return res;