Skip to content

test: add unit tests for src/errors.ts and public exports snapshot - #48

Closed
sparkysolutions10-pixel wants to merge 1 commit into
Parabola-org:mainfrom
sparkysolutions10-pixel:test/errors-and-exports-coverage
Closed

sparkysolutions10-pixel wants to merge 1 commit into
Parabola-org:mainfrom
sparkysolutions10-pixel:test/errors-and-exports-coverage

Conversation

@sparkysolutions10-pixel

Copy link
Copy Markdown

Fixes #13
/claim #13

Summary

Adds dedicated test coverage for the error taxonomy in src/errors.ts and a public runtime export snapshot for src/index.ts.

Changes

  1. tests/errors.test.ts:
    • Covers constructor wiring, field attachment, and prototype chain for all error classes:
      • TransferError (required fields, optional attestationHash, optional code discriminator ATTESTATION_NOT_READY)
      • AttestationNotReadyError (with burnTxHash attachment and discrimination)
      • IrisRequestError (with optional HTTP status code)
      • SubmissionTimeoutError (with hash attachment)
    • Asserts instanceof behavior across Error hierarchy.
  2. tests/exports.test.ts:
    • Imports from src/index.js and asserts the exact sorted list of exported runtime symbols.
    • Asserts that all core workflows (transfer, completeMint, resolveBurn, estimateFee, getAttestation) and error classes are properly exported as functions/constructors.

Signed-off-by: sparkysolutions10-pixelmy [email protected]


💳 Verified Settlement & Payout Rails

- Adds comprehensive unit tests for TransferError, AttestationNotReadyError, IrisRequestError, and SubmissionTimeoutError
- Tests constructor fields, optional arguments, prototype chain, and instanceof behavior
- Adds public export surface snapshot test asserting exact runtime symbols exported from src/index.ts
- Fixes Parabola-org#13

Signed-off-by: sparkysolutions10-pixelmy <[email protected]>
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