Summary of What Needs to be Done: Add unit tests for the pure utility functions in src/lib/themes.ts: isThemeId, getThemeDefinition, isDarkTheme, and nextThemeId.
Changes that Need to be Made: Create test/themes.test.ts. Cover: isThemeId with all four valid theme IDs (should return true), invalid strings and null/undefined (should return false). getThemeDefinition with valid and invalid IDs (falls back to default). isDarkTheme for each theme (verifies mode mapping). nextThemeId wraps correctly from last theme back to first, and handles currentTheme not in list.
Impact that it would Provide: Theme utilities are used throughout the UI layer (nextThemeId drives keyboard navigation between themes). Correctness here prevents theme-switching bugs that could affect user experience. Small, fast tests that run in the unit suite.
Hello @Priyanshu-byte-coder, please assign this issue to me (@tmdeveloper007) so I can open a focused PR.
Summary of What Needs to be Done: Add unit tests for the pure utility functions in src/lib/themes.ts: isThemeId, getThemeDefinition, isDarkTheme, and nextThemeId.
Changes that Need to be Made: Create test/themes.test.ts. Cover: isThemeId with all four valid theme IDs (should return true), invalid strings and null/undefined (should return false). getThemeDefinition with valid and invalid IDs (falls back to default). isDarkTheme for each theme (verifies mode mapping). nextThemeId wraps correctly from last theme back to first, and handles currentTheme not in list.
Impact that it would Provide: Theme utilities are used throughout the UI layer (nextThemeId drives keyboard navigation between themes). Correctness here prevents theme-switching bugs that could affect user experience. Small, fast tests that run in the unit suite.
Hello @Priyanshu-byte-coder, please assign this issue to me (@tmdeveloper007) so I can open a focused PR.