Skip to content

Fix typo and incorrect JSDoc references in Invoice and PaymentRefund#411

Open
Alexander M. Marin (madmarin) wants to merge 1 commit intomercadopago:masterfrom
madmarin:hotfix/fix-invoice-typo-and-paymentrefund-jsdoc
Open

Fix typo and incorrect JSDoc references in Invoice and PaymentRefund#411
Alexander M. Marin (madmarin) wants to merge 1 commit intomercadopago:masterfrom
madmarin:hotfix/fix-invoice-typo-and-paymentrefund-jsdoc

Conversation

@madmarin

What does this PR fix?

Three copy-paste bugs found in Invoice and PaymentRefund clients:

1. Typo in Invoice.search() parameter name

ivoicesSearchOptionsinvoicesSearchOptions

File: src/clients/invoice/index.ts

2. Wrong JSDoc on PaymentRefund.total()

The total() method had the JSDoc copied from create():

  • Description said "Create Refund" instead of "Total Refund"
  • Example link pointed to create.ts instead of total.ts (which already exists)

File: src/clients/paymentRefund/index.ts

3. Wrong describe label in refundTotal.spec.ts

Test suite said "Testing payments refunds, create" but tests the total function.

File: src/clients/paymentRefund/total/refundTotal.spec.ts

Testing

All existing tests pass with no modifications required.

- Rename parameter ivoicesSearchOptions to invoicesSearchOptions
  in Invoice.search() to correct a copy-paste typo
- Fix JSDoc on PaymentRefund.total() which incorrectly described
  the method as "Create Refund" and linked to the create example;
  now correctly says "Total Refund" and links to total.ts example
- Fix describe label in refundTotal.spec.ts which said "create"
  instead of "total" due to copy-paste from create.spec.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant