import { describe, it, expect } from 'vitest';
import { createStore } from 'jotai';
import { prefersReducedMotionAtom } from '../core/reduced-motion-store';

describe('reduced-motion-store', () => {
	it('defaults to false', () => {
		const store = createStore();
		expect(store.get(prefersReducedMotionAtom)).toBe(false);
	});

	it('can be set to true', () => {
		const store = createStore();
		store.set(prefersReducedMotionAtom, true);
		expect(store.get(prefersReducedMotionAtom)).toBe(true);
	});

	it('can be toggled back to false', () => {
		const store = createStore();
		store.set(prefersReducedMotionAtom, true);
		store.set(prefersReducedMotionAtom, false);
		expect(store.get(prefersReducedMotionAtom)).toBe(false);
	});
});
