/**
 * @vitest-environment happy-dom
 */
import { describe, it, expect, beforeEach } from 'vitest';
import { loadGlowParticlesEnabled, saveGlowParticlesEnabled } from './visualPrefs';

describe('visualPrefs', () => {
  beforeEach(() => {
    localStorage.clear();
  });

  it('defaults glow particles to on', () => {
    expect(loadGlowParticlesEnabled()).toBe(true);
  });

  it('persists glow toggle', () => {
    saveGlowParticlesEnabled(false);
    expect(loadGlowParticlesEnabled()).toBe(false);
    saveGlowParticlesEnabled(true);
    expect(loadGlowParticlesEnabled()).toBe(true);
  });
});
