testing

Validate HyperIndex indexer tests with Vitest and inline snapshots.

43|9|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/enviodev/polymarket-v2-indexer --skill testing-enviodev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/enviodev/polymarket-v2-indexer/tree/main/.claude/skills/testing
Command: npx skills add https://github.com/enviodev/polymarket-v2-indexer --skill testing-enviodev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a framework to write and run tests for HyperIndex indexers using Vitest and createTestIndexer(), enabling rapid test setup, execution, and validation of indexer behavior.

Core Features & Use Cases

  • Streamlined test setup for HyperIndex indexers, including processing block ranges, simulating events, and asserting entity changes with toMatchInlineSnapshot.
  • Supports a complete TDD workflow from test authoring to snapshot capture and regression checks.
  • Useful for debugging handler output, verifying indexer behavior, and validating changes in local or CI environments.

Quick Start

Run pnpm test to execute Vitest-based tests and auto-fill snapshots for the indexer test suite.

Frequently Asked Questions about testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test HyperIndex indexers with Vitest?

Test HyperIndex indexers with Vitest by using the createTestIndexer() function to set up tests, process block ranges, and assert entity changes using toMatchInlineSnapshot for deterministic validation.

What is the best way to automate TDD workflows for blockchain indexers?

Automate TDD workflows for blockchain indexers by authoring tests with Vitest, running pnpm test to auto-fill inline snapshots, and executing regression checks to validate indexer behavior locally or in CI environments.

Can I simulate events and process block ranges when testing HyperIndex indexers?

Yes, testing HyperIndex indexers supports simulating events and processing block ranges to verify how your handlers interact with blockchain data and validate resulting entity changes.

How do inline snapshots work when validating indexer behavior in Vitest?

Inline snapshots in Vitest validate indexer behavior by capturing expected entity states directly within the test file using toMatchInlineSnapshot, which auto-fills during execution via pnpm test for deterministic regression checks.

Does this testing approach support continuous integration environments?

Yes, this Vitest-based testing approach supports continuous integration environments by providing deterministic test execution and automated regression checks for HyperIndex indexers across development and CI pipelines.

Why use createTestIndexer for unit testing TypeScript indexers?

Use createTestIndexer for unit testing TypeScript indexers because it provides a streamlined framework to rapidly set up tests, debug handler output, and validate indexer behavior changes without complex mocking.