Skip to content

test: add unit tests for repoAnalytics module#1845

Merged
Priyanshu-byte-coder merged 2 commits into
Priyanshu-byte-coder:mainfrom
bhavyanjain3004:issue-1727
Jun 2, 2026
Merged

test: add unit tests for repoAnalytics module#1845
Priyanshu-byte-coder merged 2 commits into
Priyanshu-byte-coder:mainfrom
bhavyanjain3004:issue-1727

Conversation

@bhavyanjain3004

Copy link
Copy Markdown
Contributor

Description

This PR adds comprehensive unit tests for the repoAnalytics module (src/lib/repoAnalytics.ts) to validate the types, structures, and property assertions for RepoAnalyticsResponse and all related sub-interfaces.

Related Issue

Closes #1727

Proposed Changes

  • Created a new test file: test/repoAnalytics.test.ts
  • Added type validation and structure tests for the following exported interfaces:
    • ExplorerRepoCardData (both complete and minimal forms)
    • RepoContributorData
    • HeatmapPoint
    • RepoHealth
    • LanguageSlice
    • TimelinePoint
    • RepoAnalyticsResponse

@vercel

vercel Bot commented Jun 1, 2026

Copy link
Copy Markdown

@bhavyanjain3004 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:feature GSSoC type bonus: new feature type:testing GSSoC type bonus: tests (+10 pts) labels Jun 1, 2026
@github-actions

github-actions Bot commented Jun 1, 2026

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

@github-actions github-actions Bot added the type:devops GSSoC type bonus: devops (+15 pts) label Jun 1, 2026
@Priyanshu-byte-coder Priyanshu-byte-coder added the level1 GSSoC Level 1 - Beginner (10 points) label Jun 2, 2026
@Priyanshu-byte-coder Priyanshu-byte-coder merged commit 0501c2e into Priyanshu-byte-coder:main Jun 2, 2026
10 checks passed
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

🎉 Merged! Thanks for contributing to DevTrack.

If the project has been useful to you, a ⭐ star on the repo is the easiest way to support it — it helps DevTrack get discovered by more developers.

Keep an eye on open issues for your next contribution!

@Priyanshu-byte-coder Priyanshu-byte-coder added the gssoc:approved GSSoC: PR approved for scoring label Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved GSSoC: PR approved for scoring gssoc26 GSSoC 2026 contribution level1 GSSoC Level 1 - Beginner (10 points) type:devops GSSoC type bonus: devops (+15 pts) type:feature GSSoC type bonus: new feature type:testing GSSoC type bonus: tests (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add unit tests for repoAnalytics module

2 participants