Skip to content

[Hard]: Replace scaffold subgraph tests with real mapping coverage #3

@AnirudhSinghRajora

Description

@AnirudhSinghRajora

Context and Motivation

Current subgraph tests are scaffold-style and do not validate actual mapping behavior for core handlers.

Architecture Proposal

Build event fixtures for main contract events.
Add mapping tests for EventCreated.
Add mapping tests for TicketPurchased and user-level updates.
Add mapping tests for SpecialOfferMinted and StakeClaimed.
Assert Event, Ticket, and User entity values in store.

Cross-Repo Scope

event-ticketinng/src/event-ticketing.ts
event-ticketinng/tests/event-ticketing.test.ts
event-ticketinng/tests/event-ticketing-utils.ts
event-ticketinng/schema.graphql

Acceptance Criteria

  • EventCreated handler has meaningful mapping tests
  • TicketPurchased handler updates are fully tested
  • SpecialOfferMinted and StakeClaimed handlers are tested
  • graph test passes with strong entity assertions

Verification and Test Strategy

Run graph codegen.
Run graph build.
Run graph test and verify all added tests pass.
Confirm assertions validate expected entity fields.

Dependencies or Blockers

Requires matchstick test environment setup.
May need schema/entity alignment before assertions.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions