init project

This commit is contained in:
root
2026-06-25 19:06:59 -04:00
parent c5dfee6efb
commit 5d017f533a
349 changed files with 31330 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
import { isThemePreference, resolveTheme, serverResolvedTheme } from '@/lib/theme/config';
import { describe, expect, it } from 'vitest';
describe('theme foundations', () => {
it('accepts only approved preferences', () => {
expect(isThemePreference('light')).toBe(true);
expect(isThemePreference('dark')).toBe(true);
expect(isThemePreference('system')).toBe(true);
expect(isThemePreference('sepia')).toBe(false);
});
it('keeps preference and resolved theme separate', () => {
expect(resolveTheme('system', true)).toBe('dark');
expect(resolveTheme('system', false)).toBe('light');
expect(resolveTheme('light', true)).toBe('light');
expect(serverResolvedTheme('system')).toBe('light');
});
});