Skip to content

Unify the test runners used across the repository #24

Description

@priscaenoch

Problem

The repository uses two different test runners: the root TypeScript API service uses Vitest (vitest.config.ts, npm test), while the indexer/ service uses Jest (indexer/jest.config.js). Two runners means two configuration formats, two sets of conventions, duplicated mocking/setup knowledge, and two coverage mechanisms. Consolidating is a substantial, cross-cutting migration: it touches configs, both package manifests, roughly 47 indexer test files, CI, and contributor docs.

What needs to be done

  • Decide on one runner for the repository (Vitest is the likely target, since the root already uses it and it supports plain JavaScript).
  • Migrate the indexer's Jest configuration, setup files, and any Jest-specific APIs used in the ~47 test files to the chosen runner, preserving behaviour.
  • Unify the coverage configuration and thresholds across both services.
  • Update both package manifests, the CI workflow, and CONTRIBUTING.md to a single documented test command.
  • If the two runners must remain, document the rationale and the boundary explicitly instead.

Files

  • vitest.config.ts, a new indexer Vitest config, and removal of indexer/jest.config.js
  • indexer/package.json, package.json
  • indexer/test/** (Jest-to-Vitest API adjustments across the suite)
  • .github/workflows/ci.yml
  • CONTRIBUTING.md

Acceptance deliverables

  • A single documented test runner and command, or a documented, deliberate exception.
  • No test regressions after the migration; the full suite for both services passes under the unified runner.
  • All CI checks pass; the change cannot be merged until CI is green.

Tests to pass

  • The full suite for both the API service and the indexer passes under the unified runner.

Metadata

Metadata

Assignees

Labels

ADVANCESubstantial, cross-cutting work spanning more than five files. Not a minor fix.GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third CampaignenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions