test: add unit tests for indexing-client and viem-extension#42
Merged
Conversation
…ent and selectors 42 tests for createIndexingClient covering all query methods, response unwrapping, pagination forwarding, and address lowercasing invariants. 29 tests for viem-extension selectors (createPartnerMap, createCircleMap, createRoleMap, getAnchorCircle, getSubCircles, getRolesForCircle) against both minimal fixtures and the full mock snapshot. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…est files Add package-level tsconfig path alias (@/* → src/*) and test/** include so TypeScript resolves @/ imports in test files. Add .eslintrc.cjs to indexing-client to use its local tsconfig (ESLint was using the root tsconfig which has no paths configured). Switch indexing-client mock from vi.spyOn (graphql-request.request is not spyable via prototype in v7) to vi.mock + vi.mocked. Fix noUncheckedIndexedAccess TS2532 errors in viem-extension selectors test with non-null assertions on known-present map keys. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@hollab-io/indexing-client— covers every query method oncreateIndexingClient: response unwrapping, pagination forwarding, and address lowercasing invariants (creator,registryAddress,memberAddress)@hollab-io/viem-extension— covers all 6 selectors (createPartnerMap,createCircleMap,createRoleMap,getAnchorCircle,getSubCircles,getRolesForCircle) against both minimal fixtures and the full mock snapshotAlso fixes test infrastructure for both packages:
paths: { "@/*": ["./src/*"] }+test/**/*to each package tsconfig so ESLint resolves@/imports in test filespackages/indexing-client/.eslintrc.cjsso ESLint uses the local tsconfig (the root tsconfig has no path aliases)Test plan
pnpm --filter @hollab-io/indexing-client test→ 42 passedpnpm --filter @hollab-io/viem-extension test→ 29 passedpnpm --filter @hollab-io/indexing-client lint→ 0 errorspnpm --filter @hollab-io/viem-extension lint→ 0 errorspnpm check-types→ all packages pass🤖 Generated with Claude Code