-
Notifications
You must be signed in to change notification settings - Fork 112
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
IT Payments #270
IT Payments #270
Conversation
e2e/payment/cancel.spec.ts
Outdated
import type { PaymentCreateData } from '@src/clients/payment/create/types'; | ||
|
||
describe('IT, cancel', () => { | ||
test('should cancel Payment and match response object ', async () => { |
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.
test('should cancel Payment and match response object ', async () => { | |
test('should cancel Payment and match response object', async () => { |
e2e/payment/cancel.spec.ts
Outdated
expect(cancelation).toHaveProperty('status', 'cancelled'); | ||
}); | ||
|
||
function createPayment(): PaymentCreateData { |
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.
This doesn't need to be a function, it just needs to be a common variable., Do the same for all occurrences
const createPaymentBody = {
body: {
additional_info: {
items: [
{
id: 'MLB2907679857',
title: 'Point Mini',
quantity: 1,
unit_price: 58.8
}
]
},
payer: {
email: '[email protected]',
},
transaction_amount: 110.00,
installments: 1,
payment_method_id: 'pix',
}
}
e2e/payment/cancel.spec.ts
Outdated
|
||
describe('IT, cancel', () => { | ||
test('should cancel Payment and match response object ', async () => { | ||
const client = new MercadoPago({ accessToken: config.access_token, options: { timeout: 5000 } }); |
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.
To make the implementation simpler, let's remove the options part. Do the same for all occurrences
const client = new MercadoPago({ accessToken: config.access_token, options: { timeout: 5000 } }); | |
const client = new MercadoPago({ accessToken: config.access_token }); |
e2e/payment/capture.spec.ts
Outdated
|
||
describe('IT, capture', () => { | ||
test('should capture, return partial transaction_amount passed at the request and match response object', async () => { | ||
const client = new MercadoPago({ accessToken: config.access_token, options: { timeout: 5000 } }); |
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.
To make the implementation simpler, let's remove the options part.
const client = new MercadoPago({ accessToken: config.access_token, options: { timeout: 5000 } }); | |
const client = new MercadoPago({ accessToken: config.access_token }); |
📝 Description