From a2bb7aa580dbc29e8f750cee98bec030ba1dcbce Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 13 Jun 2026 16:41:45 -0500 Subject: Fix theme studio bg-like imported colors --- scripts/theme-studio/test-app-core.mjs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scripts/theme-studio/test-app-core.mjs') diff --git a/scripts/theme-studio/test-app-core.mjs b/scripts/theme-studio/test-app-core.mjs index 0cdc37b5..69fe896e 100644 --- a/scripts/theme-studio/test-app-core.mjs +++ b/scripts/theme-studio/test-app-core.mjs @@ -64,6 +64,12 @@ test('paletteOptionList: Boundary — assignment-only ground colors are selectab assert.ok(list.some(([hex, name]) => hex === '#f0fef0' && name === 'fg')); }); +test('paletteOptionList: Boundary — bg-like imported colors remain selectable outside ground', () => { + const pal = [['#0d0b0a', 'bg2'], ['#0d0b0a', 'bg', 'ground'], ['#f0fef0', 'fg', 'ground']]; + const list = paletteOptionList('', pal, { bg: '#0d0b0a', fg: '#f0fef0' }); + assert.deepEqual(list.slice(0, 4), [['', '— default —'], ['#0d0b0a', 'bg'], ['#f0fef0', 'fg'], ['#0d0b0a', 'bg2']]); +}); + test('paletteOptionList: Error — a cur outside palette and ground is surfaced as gone', () => { const list = paletteOptionList('#123456', PAL, { bg: '#0d0b0a', fg: '#f0fef0' }); assert.deepEqual(list[0], ['', '— default —']); -- cgit v1.2.3