import { describe, it, expect } from 'vitest'
import { makeValidPaletteSet } from './valid-theme.fixture'
import { COLOR_TOKEN_KEYS, SHAPE_TOKEN_KEYS } from './keys'

describe('valid-theme fixture', () => {
  it('is a complete PaletteSet — all keys present in both modes', () => {
    const pkg = makeValidPaletteSet()
    expect(pkg.palettes).toHaveLength(1)
    for (const mode of ['light', 'dark'] as const) {
      for (const k of COLOR_TOKEN_KEYS) expect(pkg.palettes[0]!.colors[mode][k]).toMatch(/^#[0-9a-f]{3,6}$/i)
      for (const k of SHAPE_TOKEN_KEYS) expect(typeof pkg.shape[mode][k]).toBe('string')
    }
    expect(pkg.defaultPaletteId).toBe(pkg.palettes[0]!.id)
  })
})
