Skip to content

test(caip): add tests for CAIP-2 and CAIP-19 parsing#68

Open
ak68a wants to merge 1 commit intoagentcommercekit:mainfrom
ak68a:test/caip-parsing
Open

test(caip): add tests for CAIP-2 and CAIP-19 parsing#68
ak68a wants to merge 1 commit intoagentcommercekit:mainfrom
ak68a:test/caip-parsing

Conversation

@ak68a
Copy link

@ak68a ak68a commented Mar 25, 2026

Summary

  • Add 23 tests for CAIP-2: caip2Parts() parsing, all regex patterns, predefined chain ID constants
  • Add 24 tests for CAIP-19: all 6 regex patterns for asset namespaces, references, types, and IDs

Both modules had zero test coverage. These are leaf-level utilities that the identity and payment stack builds on — did:pkh resolution depends on CAIP-2 parsing, and payment options reference assets via CAIP-19.

Test plan

  • All 96 CAIP tests pass (47 existing + 49 new)

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Mar 25, 2026

Warning

Rate limit exceeded

@ak68a has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 29 minutes and 54 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5c63ee3d-7ad7-44bc-a236-41628af9931c

📥 Commits

Reviewing files that changed from the base of the PR and between f0e8c6c and 526b3ed.

📒 Files selected for processing (2)
  • packages/caip/src/caips/caip-19.test.ts
  • packages/caip/src/caips/caip-2.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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