comparison design_system/test/catalog_test.js @ 259:667156fcd3e3

Add dev-only cyberpunk JRPG page
author MrJuneJune <me@mrjunejune.com>
date Wed, 05 Aug 2026 09:19:41 -0700
parents 60a876c4587a
children
comparison
equal deleted inserted replaced
258:60a876c4587a 259:667156fcd3e3
803 const darkMuted = systemValue('color-surface-subtle'); 803 const darkMuted = systemValue('color-surface-subtle');
804 const darkData = Array.from( 804 const darkData = Array.from(
805 { length: 10 }, 805 { length: 10 },
806 (_, index) => value(`data-${index + 1}`), 806 (_, index) => value(`data-${index + 1}`),
807 ); 807 );
808 const themes = ['paper', 'ink', 'playful'].map(theme => { 808 const themes = ['paper', 'ink', 'playful', 'cyberpunk'].map(theme => {
809 root.dataset.zenTheme = theme; 809 root.dataset.zenTheme = theme;
810 const channels = value => value.match(/\d+(?:\.\d+)?/g) 810 const channels = value => value.match(/\d+(?:\.\d+)?/g)
811 .slice(0, 3) 811 .slice(0, 3)
812 .map(Number); 812 .map(Number);
813 const luminance = value => { 813 const luminance = value => {
869 assert.equal(new Set(colorTokenState.data).size, 10); 869 assert.equal(new Set(colorTokenState.data).size, 10);
870 assert.equal(new Set(colorTokenState.darkData).size, 10); 870 assert.equal(new Set(colorTokenState.darkData).size, 10);
871 assert.notDeepEqual(colorTokenState.data, colorTokenState.darkData); 871 assert.notDeepEqual(colorTokenState.data, colorTokenState.darkData);
872 assert.equal( 872 assert.equal(
873 new Set(colorTokenState.themes.map(theme => theme.canvas)).size, 873 new Set(colorTokenState.themes.map(theme => theme.canvas)).size,
874 3, 874 4,
875 ); 875 );
876 assert.notEqual( 876 assert.notEqual(
877 colorTokenState.themes.find(theme => theme.name === 'paper').radius, 877 colorTokenState.themes.find(theme => theme.name === 'paper').radius,
878 colorTokenState.themes.find(theme => theme.name === 'playful').radius, 878 colorTokenState.themes.find(theme => theme.name === 'playful').radius,
879 ); 879 );