-
Notifications
You must be signed in to change notification settings - Fork 619
[SDK] Consolidate more tests - reduce contract deployment #5258
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Your org has enabled the Graphite merge queue for merging into mainAdd the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
size-limit report 📦
|
ebc33b2 to
681c450
Compare
681c450 to
998fc1f
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5258 +/- ##
=======================================
Coverage 45.37% 45.37%
=======================================
Files 1067 1067
Lines 55450 55450
Branches 3991 3989 -2
=======================================
Hits 25161 25161
Misses 29598 29598
Partials 691 691
*This pull request uses carry forward flags. Click here to find out more. |
| params: { | ||
| name: "Test DropERC1155", | ||
| contractURI: TEST_CONTRACT_URI, | ||
| name: "EditionDrop", |
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.
Can You still pass a contract uri here? Was useful to skip the ipsy upload
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.
oops
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.
added back
| params: { | ||
| name: "Test TokenERC1155", | ||
| contractURI: TEST_CONTRACT_URI, | ||
| name: "Edition", |
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.
Same here. Also this tests the exact same thing no? Doesn't actually help coverage
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.
added back
| expect(isGetNFTSupported(selectors)).toBe(true); | ||
| }); | ||
|
|
||
| it("should return a default value if the URI of the token doesn't exist", 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.
What's the value of moving these tests around? Feels like unnecessary work. Would you rather focus on actually writing new tests on areas that aren't covered.
You can check the uncovered areas on codecov, any file/folder with low coverage is what you should focus on.
All of react for example is particularly low
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.
I want to put the tests for token standards into the following structures:
|- erc20
|-- drop20.test.ts
|-- token20.test.ts
|
|- erc721
|-- drop721.test.ts
|-- token721.test.ts
|
|- erc1155
|-- drop1155.test.ts
|-- token1155.test.ts
to speed up the tests in general and (somehow) avoid the issue with out-of-gas + timeout
998fc1f to
ca25e6c
Compare
7658b51 to
f29dcaa
Compare
Merge activity
|
## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on cleaning up and enhancing tests related to `ERC721` and `ERC1155` contracts in the `thirdweb` package. It includes the removal of obsolete tests and the addition of new functionality checks, particularly around contract deployment and NFT minting.
### Detailed summary
- Deleted obsolete test files for `ERC721` and `ERC20`.
- Updated `mintAdditionalSupplyToBatch.test.ts` to include checks for contract names.
- Enhanced tests for `DropERC1155` and `TokenERC1155` to verify deployed names.
- Removed tests for `deployERC721` that were reliant on secret keys.
- Added new tests for minting NFTs in `token721.test.ts`, covering both object and string inputs.
- Ensured compatibility checks for NFT functions in the new tests.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
f29dcaa to
7a86344
Compare

Problem solved
Short description of the bug fixed or feature added
PR-Codex overview
This PR primarily focuses on updating tests related to the
ERC721andERC1155contracts, including renaming and restructuring tests, adding new assertions, and removing obsolete tests.Detailed summary
mintToanddeployERC721functionality.