Skip to content

test : added unit tests for themes.ts#2899

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

test : added unit tests for themes.ts#2899
tmdeveloper007 wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
tmdeveloper007:#2894

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Closes #2894.

Summary of What Has Been Done: Created test/themes.test.ts with vitest covering all exported functions from src/lib/themes.ts: isThemeId, getThemeDefinition, isDarkTheme, nextThemeId, plus THEME_OPTIONS and DEFAULT_THEME constants.

Changes Made: 47 lines of test coverage across 16 test cases including theme options, dark mode detection, ID validation, and theme cycling logic.

Impact it Made: Adds test coverage for a previously untested utility module. Ensures theme selection and dark mode logic behave correctly.

@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:design GSSoC type bonus: UI/design (+10 pts) type:testing GSSoC type bonus: tests (+10 pts) labels Jun 28, 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:design GSSoC type bonus: UI/design (+10 pts) 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 themes.ts

1 participant