Skip to content

test : added unit tests for scoreDaysSinceLastCommit function#655

Closed
tmdeveloper007 wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
tmdeveloper007:#631
Closed

test : added unit tests for scoreDaysSinceLastCommit function#655
tmdeveloper007 wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
tmdeveloper007:#631

Conversation

@tmdeveloper007
Copy link
Copy Markdown
Contributor

Closes #631.

Summary of What Has Been Done:
Added unit tests for scoreDaysSinceLastCommit function.

Changes Made:

  • Created test/repo-health.test.js with tests for scoreDaysSinceLastCommit function

Impact it Made:

  • Improves test coverage for utility functions

@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

@tmdeveloper007 is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:testing GSSoC type bonus: tests (+10 pts) labels May 22, 2026
@github-actions
Copy link
Copy Markdown

GSSoC Label Checklist 🏷️

@Priyanshu-byte-coder — please apply the appropriate labels before merging:

Difficulty (pick one):

  • level:beginner — 20 pts
  • level:intermediate — 35 pts
  • level:advanced — 55 pts
  • level:critical — 80 pts

Quality (optional):

  • quality:clean — ×1.2 multiplier
  • quality:exceptional — ×1.5 multiplier

Validation (required to score):

  • gssoc:approved — counts for points
  • gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score

Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus

Copy link
Copy Markdown
Owner

@Priyanshu-byte-coder Priyanshu-byte-coder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two issues with this PR:

  1. Missing EOF newline — test file must end with \n

  2. Tests don't import actual source code — some tests copy-paste the implementation inside the test file (e.g., #662 redefines getRateLimitRemainingFromResponse locally). Tests must import and test the real function from src/. Reimplementing the function in the test only verifies the copy, not the actual code.

  3. No test runner configured — the project has no jest, vitest, or test script in package.json. Please add vitest (or jest) config and a test script so these tests can actually run in CI. Reference: project uses TypeScript so vitest with @vitest/ui is the simplest fit.

Please fix all three and push again.

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

Labels

gssoc26 GSSoC 2026 contribution type:testing GSSoC type bonus: tests (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test : add unit tests for scoreAvgPrOpenTimeHours function

2 participants