Skip to content

fix: tests in the horizon branch #1135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 28, 2025
Merged

fix: tests in the horizon branch #1135

merged 7 commits into from
Jul 28, 2025

Conversation

pcarranzav
Copy link
Member

@pcarranzav pcarranzav commented Jul 25, 2025

Summary

Fixes TypeScript compilation errors in indexer-cli tests by adding the required isLegacy property to Action model test data.

Also adds @graphprotocol/horizon and @graphprotocol/subgraph-service as explicit dependencies to resolve address book issues.

Context

  1. The Action model in indexer-common now requires an isLegacy property, but the test utility in indexer-cli was creating Action records without this property, causing TypeScript compilation errors.

  2. The @graphprotocol/toolshed package requires @graphprotocol/horizon and @graphprotocol/subgraph-service for their address book files, but these weren't declared as dependencies. This caused "Address book path not found" errors when running tests.

Changes

  • Added isLegacy: false to both Action.create() calls in packages/indexer-cli/src/__tests__/util.ts
  • Added @graphprotocol/horizon v0.4.1 and @graphprotocol/subgraph-service v0.4.1 as explicit dependencies to indexer-common
  • Minor linting/formatting adjustments in other files

Test Results

After these changes:

  • indexer-common: All tests pass ✅
  • indexer-agent: All tests pass ✅
  • indexer-cli: TypeScript compilation errors resolved ✅

Note

Adding these packages as explicit dependencies avoids the circular dependency issue discovered in graphprotocol/contracts#1210

🤖 Generated with Claude Code

@github-project-automation github-project-automation bot moved this to 🗃️ Inbox in Indexer Jul 25, 2025
…s explicit dependencies

These packages contain address book files required by @graphprotocol/toolshed
but were not declared as dependencies. Adding them explicitly resolves the
'Address book path not found' errors in tests.

Both packages added at version 0.4.1 (latest).
The newer version of strip-ansi (v7) uses ES modules which causes Jest to fail.
Updated transformIgnorePatterns to transform strip-ansi and ansi-regex modules.
@pcarranzav pcarranzav changed the title fix: add missing isLegacy property to Action model test data fix: tests in the horizon branch Jul 28, 2025
Updated test reference files to include the three new columns added in the horizon branch:
- publicPOI and poiBlockNumber (added in commit 325d6fa)
- isLegacy (added in commit d2bfd5b)

This fixes the failing actions tests in CI.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@pcarranzav pcarranzav requested a review from tmigone July 28, 2025 15:59
Copy link
Member

@tmigone tmigone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!
We should switch to use the address book package once we have it.

@github-project-automation github-project-automation bot moved this from 🗃️ Inbox to ✅ Approved in Indexer Jul 28, 2025
@pcarranzav pcarranzav marked this pull request as ready for review July 28, 2025 16:30
@pcarranzav pcarranzav merged commit 30e3682 into horizon Jul 28, 2025
3 checks passed
@pcarranzav pcarranzav deleted the pcv/fix-horizon-tests branch July 28, 2025 16:34
@github-project-automation github-project-automation bot moved this from ✅ Approved to 🚗 Merged in Indexer Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🚗 Merged
Development

Successfully merging this pull request may close these issues.

2 participants