aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/test-app-core.mjs
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-13 16:41:45 -0500
committerCraig Jennings <c@cjennings.net>2026-06-13 16:41:45 -0500
commit17d50740c2995adf86a0e49b6812d890f7fc8522 (patch)
treed14f5e887f9ea73d1b7bdd4a81c12f40d08f84cd /scripts/theme-studio/test-app-core.mjs
parent44ce6475ed52a589d002363f29a2e7e99f972cb7 (diff)
downloaddotemacs-17d50740c2995adf86a0e49b6812d890f7fc8522.tar.gz
dotemacs-17d50740c2995adf86a0e49b6812d890f7fc8522.zip
Fix theme studio bg-like imported colors
Diffstat (limited to 'scripts/theme-studio/test-app-core.mjs')
-rw-r--r--scripts/theme-studio/test-app-core.mjs6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/theme-studio/test-app-core.mjs b/scripts/theme-studio/test-app-core.mjs
index 0cdc37b53..69fe896eb 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 —']);