feat: scaffold Tauri v2 + Svelte 5 project with base layout and utilities
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
16
tests/lib/utils/colors.test.ts
Normal file
16
tests/lib/utils/colors.test.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { getClipColor, CLIP_COLORS } from '$lib/utils/colors';
|
||||
|
||||
describe('getClipColor', () => {
|
||||
it('returns a valid hex color for index 0', () => {
|
||||
expect(getClipColor(0)).toMatch(/^#[0-9a-fA-F]{6}$/);
|
||||
});
|
||||
|
||||
it('returns different colors for different indices', () => {
|
||||
expect(getClipColor(0)).not.toBe(getClipColor(1));
|
||||
});
|
||||
|
||||
it('wraps around the palette', () => {
|
||||
expect(getClipColor(0)).toBe(getClipColor(CLIP_COLORS.length));
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user