Skip to content

[SDK] Improve general test cases #5054

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

Merged
merged 1 commit into from
Oct 22, 2024
Merged

Conversation

kien-ngo
Copy link
Contributor

@kien-ngo kien-ngo commented Oct 16, 2024

Problem solved

Short description of the bug fixed or feature added


PR-Codex overview

This PR adds a new test case to the resolveName functionality, ensuring that an error is thrown when trying to resolve a name for an address that does not own any Unstoppable Domains (UD).

Detailed summary

  • Added import for TEST_ACCOUNT_D from ~test/test-wallets.js.
  • Introduced a new test case to check error handling in resolveName.
  • The test verifies that an appropriate error message is thrown for addresses without UD ownership.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Oct 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 22, 2024 6:29am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 22, 2024 6:29am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 22, 2024 6:29am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 22, 2024 6:29am

Copy link

changeset-bot bot commented Oct 16, 2024

⚠️ No Changeset found

Latest commit: 1628fa2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

graphite-app bot commented Oct 16, 2024

Your org has enabled the Graphite merge queue for merging into main

Add 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.

Copy link
Contributor Author

kien-ngo commented Oct 16, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @kien-ngo and the rest of your teammates on Graphite Graphite

Copy link
Contributor

github-actions bot commented Oct 16, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 42.81 KB (0%) 857 ms (0%) 1.5 s (-30.74% 🔽) 2.3 s
thirdweb (cjs) 102.66 KB (0%) 2.1 s (0%) 3 s (-19.52% 🔽) 5.1 s
thirdweb (minimal + tree-shaking) 4.84 KB (0%) 97 ms (0%) 98 ms (-11.63% 🔽) 195 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 46 ms (+112.74% 🔺) 56 ms
thirdweb/react (minimal + tree-shaking) 17.36 KB (0%) 348 ms (0%) 507 ms (+192.67% 🔺) 854 ms

Copy link

codecov bot commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.30%. Comparing base (0e26a88) to head (1628fa2).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5054      +/-   ##
==========================================
+ Coverage   45.29%   45.30%   +0.01%     
==========================================
  Files        1059     1059              
  Lines       54754    54754              
  Branches     3959     3958       -1     
==========================================
+ Hits        24803    24809       +6     
+ Misses      29260    29254       -6     
  Partials      691      691              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 0e26a88
packages 40.25% <ø> (+0.01%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.

see 2 files with indirect coverage changes

@kien-ngo kien-ngo added the DO NOT MERGE This pull request is still in progress and is not ready to be merged. label Oct 16, 2024 — with Graphite App
@kien-ngo kien-ngo changed the title [SDK] Improve general test cases [SDK] Improve general test cases (dont merge yet I have more to add) Oct 17, 2024
@kien-ngo kien-ngo force-pushed the kien/improve-test-cov-oct-16 branch from cc572ca to a1586a5 Compare October 22, 2024 06:07
@kien-ngo kien-ngo changed the title [SDK] Improve general test cases (dont merge yet I have more to add) [SDK] Improve general test cases Oct 22, 2024
Copy link
Contributor

graphite-app bot commented Oct 22, 2024

Merge activity

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces new tests for resolving Unstoppable Domains and updates the `mintToBatch` test for `ERC1155` contracts, including the handling of NFT retrieval and ensuring proper error handling.

### Detailed summary
- Added a test case in `resolveName.test.ts` to check error handling for addresses without a domain.
- Updated the `mintToBatch.test.ts` to use `describe.runIf` for conditional execution.
- Refactored the `mintToBatch` test to include NFT retrieval and validation after minting.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO NOT MERGE This pull request is still in progress and is not ready to be merged. packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants