Skip to content

Update unit tests: add BillingService/CollaborationGateway mocks and adjust app greeting#1

Draft
Adityavanjre wants to merge 1 commit into
mainfrom
codex/review-code-for-issues-and-fixes
Draft

Update unit tests: add BillingService/CollaborationGateway mocks and adjust app greeting#1
Adityavanjre wants to merge 1 commit into
mainfrom
codex/review-code-for-issues-and-fixes

Conversation

@Adityavanjre
Copy link
Copy Markdown
Owner

Motivation

  • Ensure unit tests reflect new service dependencies and updated application status messaging.
  • Provide minimal mocks for newly introduced services so tests can instantiate service providers without touching implementation details.

Description

  • Added a mock BillingService provider with getPlanByTenant and checkQuota stubs to ledger.service.spec.ts so LedgerService tests satisfy new constructor dependencies.
  • Updated the AppController spec expectation string in app.controller.spec.ts to Nexus ERP API Gateway is Operational to match the current status message.
  • Added a mock CollaborationGateway with broadcastCommentAdded and broadcastCommentDeleted to audit-collab-001.spec.ts and registered it in the testing module to satisfy CollaborationService dependencies, and added a debug console.log in the delete comment test to emit the actual error message on failure.

Testing

  • Ran the unit test suite for the modified specs using Jest (yarn test), focusing on ledger.service.spec.ts, app.controller.spec.ts, and audit-collab-001.spec.ts, and the updated tests completed successfully.
  • Verified that the double-entry integrity test still rejects imbalanced journal entries by asserting a BadRequestException is thrown.

Codex Task

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 22, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ff3e8fc6-2f75-49e4-9fd0-3bb374c87339

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can get early access to new features in CodeRabbit.

Enable the early_access setting to enable early access features such as new models, tools, and more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant