import { jsx as _jsx } from "react/jsx-runtime";
// @vitest-environment happy-dom
import { describe, expect, it } from 'vitest';
import { render, screen } from '@testing-library/react';
import { SeoCharCount } from '../../components/seo/SeoCharCount.js';
describe('SeoCharCount', () => {
    it('shows a neutral empty state', () => {
        render(_jsx(SeoCharCount, { value: "", min: 30, max: 60 }));
        expect(screen.getByText('0/60')).toBeTruthy();
    });
    it('marks a value within the ideal range as good', () => {
        render(_jsx(SeoCharCount, { value: 'x'.repeat(40), min: 30, max: 60 }));
        expect(screen.getByText(/40\/60 · good/)).toBeTruthy();
    });
    it('flags a value over the max as too long (destructive)', () => {
        const { container } = render(_jsx(SeoCharCount, { value: 'x'.repeat(70), min: 30, max: 60 }));
        expect(screen.getByText(/70\/60 · too long/)).toBeTruthy();
        expect(container.querySelector('.text-destructive')).toBeTruthy();
    });
    it('hints to aim for the range when below min', () => {
        render(_jsx(SeoCharCount, { value: 'x'.repeat(10), min: 30, max: 60 }));
        expect(screen.getByText(/aim for 30–60/)).toBeTruthy();
    });
});
//# sourceMappingURL=seo-char-count.test.js.map