fix: fix tests for custom error handler
Signed-off-by: Radoslaw Wielonski <radoslaw.wielonski@nordcloud.com>
This commit is contained in:
@@ -43,12 +43,17 @@ describe('ServiceBuilderImpl', () => {
|
||||
req: Request,
|
||||
res: Response,
|
||||
next: NextFunction,
|
||||
) => {};
|
||||
) => {
|
||||
console.log(req, res);
|
||||
next(error);
|
||||
};
|
||||
serviceBuilder.setErrorHandler(customErrorHandler);
|
||||
// @ts-ignore check private attribute
|
||||
expect(serviceBuilder.errorHandler).toEqual(customErrorHandler);
|
||||
});
|
||||
it('use default error handler', () => {
|
||||
const serviceBuilder = new ServiceBuilderImpl(module);
|
||||
// @ts-ignore check private attribute
|
||||
expect(serviceBuilder.errorHandler).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user