test: add unit tests for firehose implementation
Added comprehensive test coverage for the firehose subscription system:
Indexer tests (indexer.test.ts):
- Post handlers: creation, updates, deletion, forum refs, reply refs
- Forum handlers: create, update, delete
- Category handlers: creation with/without forum lookup
Firehose service tests (firehose.test.ts):
- Construction and initialization
- Lifecycle management (start, stop, already running check)
- Cursor management (resume from saved, start fresh)
Test coverage:
- 42 total tests passing
- Validates event transformation logic
- Confirms proper database interaction patterns
- Tests error handling and edge cases
All tests use vitest with mocked database instances to verify
behavior without requiring actual database connections.