Fix smoke test, complete env example, and clean unused dependencies#28
Conversation
oomokaro1
left a comment
There was a problem hiding this comment.
Summary
Rewrites the smoke test with @nestjs/testing, adds an .env.example validation test, removes unused dependencies, and exports MetricsService. Issue requirements are fully addressed, but CI is failing due to the new smoke test.
Blocking Issues
CI Failure — Smoke test crashes in PaymentCursorService
The test fails at payment-cursor.service.ts:50:
TypeError: Cannot read properties of undefined (reading 'get')
at PaymentCursorService.restoreCursor
at PaymentDetectorService.onModuleInit
The mock in app.smoke.spec.ts sets RedisService.getClient to jest.fn() (returns undefined), but PaymentCursorService.restoreCursor() calls this.redis.getClient().get(...). The mock needs to return a mock client object with a .get() method, or override PaymentCursorService/PaymentDetectorService in the test module.
What's Good
- Dependency cleanup removes ~20 unused packages (socket.io, websockets, bcrypt, zod, axios-retry, redis, etc.)
- The env-example spec is a nice regression guard
- Exporting MetricsService fixes a real DI resolution issue
- The smoke test approach is sound — just needs the Redis mock fleshed out
oomokaro1
left a comment
There was a problem hiding this comment.
Review Summary
This PR fixes the smoke test, completes the , and cleans unused dependencies — all requirements from issue #13 are satisfied.
Blocking Issues
None
Code Issues
None
What's Good
- Smoke test properly rewritten with and comprehensive mocks ()
- restructured with clear Required/Optional sections
- Regression test for keys () is a helpful addition
- Unused dependencies removed: , , , , , (verified no imports in codebase)
- exported from for proper module resolution
- JWT_SECRET updated to meet 32-char minimum
CI is not configured (empty ), which is acceptable for this cleanup/fix PR.
oomokaro1
left a comment
There was a problem hiding this comment.
Review Summary
This PR fixes the smoke test, completes the .env.example, and cleans unused dependencies — all requirements from issue #13 are satisfied.
Blocking Issues
None
Code Issues
None
What's Good
- Smoke test properly rewritten with @nestjs/testing and comprehensive mocks
- .env.example restructured with clear Required/Optional sections
- Regression test for .env.example keys is a helpful addition
- Unused dependencies removed: redis, zod, bcrypt, @nestjs/websockets, @nestjs/platform-socket.io, axios-retry (verified no imports in codebase)
- MetricsService exported from MonitoringModule for proper module resolution
- jest-setup.ts JWT_SECRET updated to meet 32-char minimum
CI is not configured (empty statusCheckRollup), which is acceptable for this cleanup/fix PR.
Summary
Closes #13
AppModulewith@nestjs/testingGET /health.env.examplewith required app, database, Redis, auth, Stellar, and platform config.env.examplekeys documentedMetricsServicefromMonitoringModuleso dependent modules resolve correctlyVerification
npm run buildnpm test -- --runInBandResult: 26 test suites passed, 212 tests passed.