-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: update critical packages, fix tests, update error check #186
chore: update critical packages, fix tests, update error check #186
Conversation
@@ -7,7 +7,7 @@ export default async function getPaymentDetailsById(paymentId: string, mollieCli | |||
return payment; | |||
} catch (error: any) { | |||
Logger.debug('Error in getPaymentDetailsById'); | |||
if (error.status === 404) { | |||
if (error.statusCode === 404) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since 2.6.0 mollie-api-node returns statusCode instead of status, check mollie/mollie-api-node@v3.5.1...v3.6.0 and find src/errors/ApiError.ts
@@ -7,7 +7,7 @@ export default async function getOrderDetailsById(orderId: string, mollieClient: | |||
return order; | |||
} catch (error: any) { | |||
Logger.debug('Error in getOrderDetailsById'); | |||
if (error.status === 404) { | |||
if (error.statusCode === 404) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since 2.6.0 mollie-api-node returns statusCode instead of status, check mollie/mollie-api-node@v3.5.1...v3.6.0 and find src/errors/ApiError.ts
@@ -40,8 +39,8 @@ describe('handleRequest', () => { | |||
Logger.error = mockLogError; | |||
Logger.debug = mockLogDebug; | |||
|
|||
mocked(handleOrderWebhook).mockResolvedValue(mockCTPayment); | |||
mocked(handlePaymentWebhook).mockResolvedValue(mockCTPayment); | |||
jest.mocked(handleOrderWebhook).mockResolvedValue(mockCTPayment); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ts-jest/utils
and mocked are removed from v28.0.0 on (kulshekhar/ts-jest#3334), reworked as suggested on their repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed it & LGTM 👍
Description
mocked
in tests withjest.mocked
as result of removedts-jest/utils
from v28.0.0 on (feat(core): removets-jest/utils
sub path export kulshekhar/ts-jest#3334)Type of change
Testing
Checklist: