Skip to content

js: Add tests for BurnChecked instruction#119

Merged
joncinque merged 2 commits intosolana-program:mainfrom
raushan728:test/burn-checked-js-suite
Mar 20, 2026
Merged

js: Add tests for BurnChecked instruction#119
joncinque merged 2 commits intosolana-program:mainfrom
raushan728:test/burn-checked-js-suite

Conversation

@raushan728
Copy link
Contributor

@raushan728 raushan728 commented Dec 25, 2025

Added a dedicated test suite for the BurnChecked instruction in clients/js
Changes:

  • Created clients/js/test/burnChecked.test.ts.
  • Success Tests: Verified standard burns with supply check, delegated burns, and zero-amount edge cases.
  • Failure Tests: Validated errors for decimal mismatches, insufficient funds, and missing signers.

@raushan728
Copy link
Contributor Author

@joncinque @timkoopmans The review has been pending for a long time — please take a look once

Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the slow review, this wasn't very high priority unfortunately, but we do appreciate your contribution.

I'll kick off CI, but I think we just need to remove some of these tests and we can merge it

@joncinque
Copy link
Contributor

Actually, can you rebase your branch? We won't be able to run CI otherwise

@raushan728 raushan728 force-pushed the test/burn-checked-js-suite branch from 59782d0 to 34374c1 Compare March 20, 2026 02:30
@raushan728
Copy link
Contributor Author

Done @joncinque

  • Removed it burns all tokens successfully test
  • Removed it burns with different decimal precisions test
  • Removed it updates mint supply correctly after burn test and migrated the supply check logic into the first test
  • Rebased the branch

@joncinque
Copy link
Contributor

Looks like formatting is failing -- can you run pnpm format:fix from clients/js and commit the result?

@joncinque joncinque removed the request for review from timkoopmans March 20, 2026 11:08
@raushan728
Copy link
Contributor Author

Looks like formatting is failing -- can you run pnpm format:fix from clients/js and commit the result?

done

Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

@joncinque joncinque merged commit dae0830 into solana-program:main Mar 20, 2026
27 checks passed
@joncinque joncinque changed the title test(js): implement comprehensive test suite for BurnChecked instruction js: Add tests for BurnChecked instruction Mar 20, 2026
@raushan728 raushan728 deleted the test/burn-checked-js-suite branch March 20, 2026 15:24
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.

3 participants