Skip to content

test : added unit tests for repoAnalyticsUtils date formatters#1286

Open
tmdeveloper007 wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
tmdeveloper007:#1275
Open

test : added unit tests for repoAnalyticsUtils date formatters#1286
tmdeveloper007 wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
tmdeveloper007:#1275

Conversation

@tmdeveloper007
Copy link
Copy Markdown
Contributor

Refs #1275.

Summary of What Has Been Done:
Added comprehensive unit tests for the date formatting utilities in src/lib/repoAnalyticsUtils.ts: formatDate, formatRelativeDate, and formatDisplayDate.

Changes Made:

  • Created new test file: test/repoAnalyticsUtils.test.ts
  • Added tests for formatDate covering standard dates, leap year dates, and invalid date handling
  • Added tests for formatRelativeDate covering Today, Yesterday, and recent dates
  • Added tests for formatDisplayDate covering string and Date object inputs

Impact it Made:
Improved test coverage for date formatting utilities used in repository analytics display. All 8 tests pass.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

@TESTPERSONAL 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 27, 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

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.

1 participant