Skip to content

Add test suite for pure calldata/derivation logic#3

Draft
gskril wants to merge 2 commits into
mainfrom
test/add-test-suite
Draft

Add test suite for pure calldata/derivation logic#3
gskril wants to merge 2 commits into
mainfrom
test/add-test-suite

Conversation

@gskril

@gskril gskril commented Jul 2, 2026

Copy link
Copy Markdown
Member

Summary

  • Add 32 Bun tests across 4 colocated *.test.ts files covering pure/deterministic logic in utils, v2, cointype, and set calldata encoding helpers.
  • Export encodeSetAddr, encodeSetText, encodeSetContenthash, encodeBatchOperation, and batchOperationSchema from set.ts for testability.
  • Wire bun run test into CI after typecheck and before build.

Coverage

  • utils: name validation/normalization, 2LD label extraction, hex validation, duration defaults
  • v2: subname splitting, .eth name assertions, registry/resolver salt derivation, CREATE2 resolver address (Sepolia regression lock), role bitmap constants
  • cointype: ENSIP-11 coin type resolution from coinType or chainId
  • set: resolver calldata selectors (setAddr, setText, setContenthash) with viem round-trip decode, batch operation schema validation

Test plan

  • bun install
  • bun run typecheck
  • bun test (32 tests, 0 failures)
  • CI preview workflow runs tests before build

Made with Cursor

@pkg-pr-new

pkg-pr-new Bot commented Jul 2, 2026

Copy link
Copy Markdown

Open in StackBlitz

npx https://pkg.pr.new/ensdomains/ens-cli/@ensdomains/cli@3

commit: 0bedf55

gskril and others added 2 commits July 2, 2026 15:50
Co-authored-by: Cursor <cursoragent@cursor.com>
…gic tests

Co-authored-by: Cursor <cursoragent@cursor.com>
@gskril gskril force-pushed the test/add-test-suite branch from c08ec46 to 0bedf55 Compare July 2, 2026 19:51
@gskril gskril marked this pull request as draft July 2, 2026 20:41
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