Skip to content

Fix smoke test, complete env example, and clean unused dependencies#28

Merged
oomokaro1 merged 6 commits into
OrbitStream:mainfrom
0xMegie:issue-13
Jun 23, 2026
Merged

Fix smoke test, complete env example, and clean unused dependencies#28
oomokaro1 merged 6 commits into
OrbitStream:mainfrom
0xMegie:issue-13

Conversation

@0xMegie

@0xMegie 0xMegie commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #13

  • Rewrote the app smoke test to boot AppModule with @nestjs/testing
  • Added coverage for GET /health
  • Completed .env.example with required app, database, Redis, auth, Stellar, and platform config
  • Removed unused dependencies and stale type packages
  • Added a regression test to keep required .env.example keys documented
  • Exported MetricsService from MonitoringModule so dependent modules resolve correctly

Verification

  • npm run build
  • npm test -- --runInBand

Result: 26 test suites passed, 212 tests passed.

@oomokaro1 oomokaro1 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.

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 oomokaro1 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.

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 oomokaro1 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.

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.

@oomokaro1 oomokaro1 merged commit 652250a into OrbitStream:main Jun 23, 2026
1 check 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.

[BUG] Fix Smoke Test, Complete .env.example, Clean Dependencies

2 participants