This commit is contained in:
Andras Schmelczer 2026-05-16 15:05:35 +01:00
commit 1fe5015056
55 changed files with 2036 additions and 685 deletions

View file

@ -60,7 +60,6 @@ describe('vibe and audio config contract', () => {
expect(new Set(vibeIds).size).toBe(vibeIds.length);
expect(vibeIds.every((id) => /^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(id))).toBe(true);
expect(audioIds.slice().sort()).toEqual(vibeIds.slice().sort());
expect(vibeIds).toContain(gardenAudioConfig.fallbackVibeId);
});
it('keeps each vibe palette and audio profile complete', () => {
@ -97,6 +96,11 @@ describe('vibe and audio config contract', () => {
});
});
it('falls back to finite RGB channels for malformed hex colors', () => {
expect(hexToRgb('not-a-color')).toEqual([0, 0, 0]);
expect(hexToRgb('#abcdzz')).toEqual([0, 0, 0]);
});
it('uses discrete color interaction matrices for every vibe', () => {
VIBE_PRESETS.forEach((vibe) => {
colorInteractionKeys.forEach((key) => {