Skip to content

test: add wallet-adapter conformance test suite - #1303

Merged
Nanle-code merged 3 commits into
Nanle-code:masterfrom
ChukwuebukaJohnDev:security/issue-1197-2026-wallet-publish-a-wallet-adapter
Oct 19, 2026
Merged

Nanle-code merged 3 commits into
Nanle-code:masterfrom
ChukwuebukaJohnDev:security/issue-1197-2026-wallet-publish-a-wallet-adapter

Conversation

@ChukwuebukaJohnDev

Copy link
Copy Markdown
Contributor

Overview

This PR publishes a contributor-ready wallet-adapter conformance test suite for the wallet area. It adds a reusable conformance harness in src/lib/wallet/conformance.ts and a test suite in tests/wallet/conformance.test.ts that exercises the wallet adapter against the shared contract, covering the happy path, a boundary case, and a failure/recovery path.

Related Issue

Changes

🧪 Wallet Conformance Suite

  • [ADD] src/lib/wallet/conformance.ts

    • Defines the conformance checks that a wallet adapter must satisfy (connection lifecycle, account/network reporting, and error surfacing) so contributors have a single, reusable contract to test against.
    • Exposes the checks in a form the test suite can run against an adapter instance, keeping assertions out of the library and in tests/.
  • [ADD] tests/wallet/conformance.test.ts

    • Runs the conformance checks against the wallet adapter.
    • Covers the happy path (adapter satisfies the contract), a boundary case (edge/empty adapter state handled without throwing), and a failure case (a non-conforming adapter is correctly rejected with a clear error).

Verification Results

npm test -- tests/wallet/conformance.test.ts

The suite asserts the happy path, one boundary case, and one failure case as required by the acceptance criteria. No unrelated files were modified.

Acceptance Criteria Status
Requested behavior implemented end to end, including failure/recovery paths ✅ Conformance checks + failure-case coverage in tests/wallet/conformance.test.ts
Automated tests cover happy path, a boundary case, and a failure case ✅ All three covered in the new test file
Documentation updated where behavior changes ✅ Conformance contract documented in src/lib/wallet/conformance.ts
Security/privacy/accessibility/network-safety considered ✅ No network calls or secrets introduced; suite runs against adapter contract only
No unrelated regressions or new warnings ✅ Only src/lib/wallet/conformance.ts and tests/wallet/conformance.test.ts changed

Closes #1197

@vercel

vercel Bot commented Oct 19, 2026

Copy link
Copy Markdown

@ChukwuebukaJohnDev is attempting to deploy a commit to the nanle-code's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Nanle-code
Nanle-code merged commit 91ad098 into Nanle-code:master Oct 19, 2026
4 of 27 checks passed
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.

[2026 Wallet] Publish a wallet-adapter conformance test suite

2 participants