Skip to content

test(pairs): cover pair-meta validation and info defaults#243

Open
changliuchang777 wants to merge 2 commits into
StableRoute-Org:mainfrom
changliuchang777:test/pairs-15-meta-coverage
Open

test(pairs): cover pair-meta validation and info defaults#243
changliuchang777 wants to merge 2 commits into
StableRoute-Org:mainfrom
changliuchang777:test/pairs-15-meta-coverage

Conversation

@changliuchang777

Copy link
Copy Markdown

Summary

  • Add pair-meta tests for default /info aggregation on registered pairs.
  • Cover fee_bps boundaries, out-of-range/non-integer/array/object rejection, unknown-body-key rejection, and canonical error envelopes.
  • Cover min, max, and liquidity invalid string-shape cases, array/object rejection, unregistered 404 envelopes, and default /info metadata.
  • Tighten minAmount and liquidity validation to reject leading-zero integer strings while still allowing 0 as the unset value.

Fixes #15

Validation

  • git diff --check (passes; only Git for Windows LF/CRLF warnings shown)
  • npm install --no-audit --no-fund (passes; npm warns current Node v20.15.0 is below eslint-visitor-keys preferred engine)
  • npm test -- --runInBand (blocked by existing baseline: src/index.ts redeclares WEBHOOK_MAX_EVENTS, causing import-time parse failures across suites; unrelated store timestamp assertions also fail)
  • npm run build (blocked by existing baseline TypeScript errors: duplicate declarations in src/index.ts, missing/extra PairMeta fields, missing BULK_ABSOLUTE_MAX, undefined quote variables)
  • npm run lint (blocked by existing baseline lint errors in existing files, including errorHandler.test.ts, securityHeaders.test.ts, and unused declarations in src/index.ts)

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.

Add test coverage for pair-meta PATCH validation and info aggregation

1 participant