Skip to content

Conversation

@yanekyuk
Copy link
Contributor

@yanekyuk yanekyuk commented Jan 23, 2026

Summary

This PR fixes a TypeScript build error (TS2741) in the opportunity job test file.

Changes

  • Added the missing candidateDescription property to the mock Opportunity object in src/jobs/opportunity.job.spec.ts

Problem

The Opportunity interface in opportunity.evaluator.types.ts requires a candidateDescription property, but the mock object in the test file was missing it, causing the build to fail:

error TS2741: Property 'candidateDescription' is missing in type '{ type: "collaboration"; title: string; description: string; score: number; candidateId: string; }' but required in type 'Opportunity'.

Testing

  • bun run build now completes successfully

Summary by CodeRabbit

  • Tests
    • Updated test data to include additional candidate information in opportunity evaluations.

✏️ Tip: You can customize this high-level summary in your review settings.

The Opportunity interface requires candidateDescription property.
Added the missing property to the mock object in opportunity.job.spec.ts
to fix TypeScript build error TS2741.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 23, 2026

📝 Walkthrough

Walkthrough

Adds a candidateDescription field to the MockOpportunityEvaluator's test payload in the opportunity job specification test file. This extends the mock Opportunity object with a string description for the candidate.

Changes

Cohort / File(s) Summary
Test Mock Enhancement
protocol/src/jobs/opportunity.job.spec.ts
Adds candidateDescription field to MockOpportunityEvaluator's returned Opportunity object

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

🐰 A field hops into the test,
The candidateDescription's blessed,
In mocks it now shall dwell,
Descriptions to tell,
Making opportunities the best! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a missing candidateDescription field to a mock Opportunity object in a test file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@serefyarar serefyarar merged commit 2bd38f8 into indexnetwork:dev Jan 23, 2026
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.

2 participants