fix(test): make the test suites typecheck - #1652
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Restores TypeScript checking for test suites and resolves resulting type errors.
Changes:
- Fixes test TypeScript configuration and adds
typecheck:tests. - Adds union narrowing, branded XDR types, and explicit
.jsimports. - Replaces Lodash matching with Vitest matchers and removes Lodash.
Reviewed changes
Copilot reviewed 39 out of 40 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
test/unit/xdr/schema_exhaustive.test.ts |
Uses public XDR type export; removes unused variable. |
test/unit/utils.test.ts |
Removes unused import. |
test/unit/spec/event_spec.test.ts |
Narrows decoded event topic variant. |
test/unit/spec/contract_spec.test.ts |
Adds safe XDR map/value narrowing. |
test/unit/server/soroban/simulate_transaction.test.ts |
Fixes imports and XDR typing. |
test/unit/server/soroban/send_transaction.test.ts |
Adds .js import extension. |
test/unit/server/soroban/query_contract.test.ts |
Adds .js import extension. |
test/unit/server/soroban/get_version_info.test.ts |
Adds .js import extension. |
test/unit/server/soroban/get_transactions.test.ts |
Adds .js import extension. |
test/unit/server/soroban/get_transaction.test.ts |
Fixes import and removes unused XDR binding. |
test/unit/server/soroban/get_network.test.ts |
Adds .js import extension. |
test/unit/server/soroban/get_ledger_entries.test.ts |
Adds .js import extension. |
test/unit/server/soroban/get_latest_ledger.test.ts |
Adds .js import extension. |
test/unit/server/soroban/get_health.test.ts |
Adds .js import extension. |
test/unit/server/soroban/get_fee_stats.test.ts |
Adds .js import extension. |
test/unit/server/soroban/get_events.test.ts |
Adds .js import extension. |
test/unit/server/soroban/get_contract_wasm.test.ts |
Uses directly typed XDR imports. |
test/unit/server/soroban/get_contract_methods.test.ts |
Uses directly typed XDR imports. |
test/unit/server/soroban/get_contract_data.test.ts |
Adds .js import extension. |
test/unit/server/soroban/get_classic_entries.test.ts |
Fixes import and unused parameter. |
test/unit/server/soroban/get_account.test.ts |
Adds .js import extension. |
test/unit/server/soroban/constructor.test.ts |
Adds .js import extension. |
test/unit/server/soroban/assembled_transaction.test.ts |
Narrows unions and corrects string arguments. |
test/unit/server_async_transaction.test.ts |
Removes unused import. |
test/unit/guide-snippets.test.ts |
Adds .js import extension. |
test/unit/contract/client_from.test.ts |
Adds .js import extension. |
test/unit/base/transaction.test.ts |
Removes unused types and type-safe mutation casts. |
test/unit/base/strkey.test.ts |
Removes unsupported XDR format argument. |
test/unit/base/scval.test.ts |
Adds safe ScVal narrowing. |
test/unit/base/operations/set_options.test.ts |
Narrows parsed signer hashes to bytes. |
test/unit/base/numbers/xdr_large_int.test.ts |
Removes unused import. |
test/unit/base/muxed_account.test.ts |
Removes unused import. |
test/unit/base/events.test.ts |
Uses branded contract identifiers. |
test/unit/base/auth.test.ts |
Narrows authorization credential variants. |
test/unit/base/address.test.ts |
Uses branded contract and pool identifiers. |
test/tsconfig.json |
Enables effective test-suite typechecking. |
test/integration/bindings.test.ts |
Removes unused import. |
test/integration/apiary.test.ts |
Replaces Lodash matching with Vitest. |
pnpm-lock.yaml |
Removes direct Lodash lock entries. |
package.json |
Adds test typecheck script and removes Lodash. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Ryang-21
approved these changes
Aug 14, 2026
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.
test/tsconfig.json, which had been typechecking nothing — itsvitest/globalsentry could not resolve under the config's owntypeRoots, sotscreported a singleTS2688and silently skipped all 130 files it had loadedexpectVariantandexpectDefinedhelpers,.jsextensions on relative imports, and branded XDR byte types (ContractId/PoolIdwhereHashwas being passed)noImplicitAny, droppedexactOptionalPropertyTypes, setimportHelpers: false— clearing 33 errors reported againstsrc/**thatbuild:typesnever producestypecheck:testsscript and chained it intotest_.isMatchcall in the apiary integration test withtoMatchObjectandarrayContaining, and dropped the now-unusedlodashdevDependency"raw"format argument instrkey.test.tsthat matches nofromXdroverload and is discarded at runtime