Skip to content

fix: consolidate duplicate indexer integration tests - #604

Merged
ogazboiz merged 2 commits into
LabsCrypt:mainfrom
wheval:fix/issues-548
Jun 3, 2026
Merged

fix: consolidate duplicate indexer integration tests#604
ogazboiz merged 2 commits into
LabsCrypt:mainfrom
wheval:fix/issues-548

Conversation

@wheval

@wheval wheval commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Consolidates duplicate indexer integration test suites into a single tests/ layout: worker lifecycle tests live in indexer-worker.test.ts, HTTP route tests stay in streams.test.ts, and DB-backed flows remain in stream-lifecycle.test.ts.

Purpose / Motivation

Three overlapping files exercised the same indexer → stream flows (src/__tests__/integration/streams.test.ts, tests/integration/streams.test.ts, and tests/integration/stream-lifecycle.test.ts). The split src/__tests__/ location also duplicated Vitest discovery paths and slowed CI.

Changes Made

  • Moved worker-based indexer tests (including fee_config_updated and admin_transferred) from src/__tests__/integration/streams.test.ts to tests/integration/indexer-worker.test.ts.
  • Removed duplicate POST-based lifecycle blocks from tests/integration/streams.test.ts; that file now covers claimable fallback, SSE contracts, and events pagination only.
  • Deleted backend/src/__tests__/integration/streams.test.ts.
  • Narrowed vitest.config.ts include to tests/** only.

How to Test

  1. From backend/, run the full suite:
    npx vitest run
  2. Run the consolidated integration files:
    npx vitest run tests/integration/indexer-worker.test.ts tests/integration/streams.test.ts tests/integration/stream-lifecycle.test.ts
  3. Expected: all tests pass; no references to src/__tests__/ remain.

Breaking Changes

None.

Related Issues

Closes #548

Checklist

  • Code builds successfully
  • Tests added/updated
  • No console errors
  • Documentation updated (if needed)

Move worker tests to tests/integration/indexer-worker.test.ts,
remove overlapping lifecycle blocks from streams.test.ts, and
drop the src/__tests__ test root.

Closes LabsCrypt#548
@ogazboiz

ogazboiz commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

hey, #706 just merged and fixes a broken test-mock pattern that was causing 'Failed Suites' / 'is not a function' / '0 tests' on backend integration tests. please rebase to pick it up:

git fetch upstream
git rebase upstream/main
git push --force-with-lease

Keep consolidated tests/** include and upstream JWT_SECRET env.
Restore auth.js mock from upstream in streams.test.ts.

@ogazboiz ogazboiz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

clean consolidation. the rename of src/tests/integration/streams.test.ts to tests/integration/indexer-worker.test.ts plus the trim of tests/integration/streams.test.ts removes the three-way overlap nicely. mock paths updated correctly, vitest.config.ts adjusted. CI green. merging.

if you want to keep contributing, join us on Telegram: https://t.me/+DOylgFv1jyJlNzM0

@ogazboiz
ogazboiz merged commit 799dc73 into LabsCrypt:main Jun 3, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Testing] Consolidate duplicate/overlapping indexer integration test files

2 participants