import { readFileSync } from 'node:fs';
import { describe, expect, it } from 'vitest';

describe('reduced-motion CSS guard', () => {
  it('disables animations and transitions when requested by the user', () => {
    const cssPath = `${process.cwd()}/src/index.css`;
    const css = readFileSync(cssPath, 'utf8');

    expect(css).toContain('@media (prefers-reduced-motion: reduce)');
    expect(css).toContain('animation-duration: 0.001ms !important');
    expect(css).toContain('animation-iteration-count: 1 !important');
    expect(css).toContain('transition-duration: 0.001ms !important');
  });
});
