import { renderHook } from '@testing-library/react';
import { useId } from './useId';
describe('useId', () => {
    it('should return a string', () => {
        const { result } = renderHook(() => useId());
        expect(typeof result.current).toBe('string');
    });
    it('should return unique id', () => {
        const { result: result1 } = renderHook(() => useId());
        const { result: result2 } = renderHook(() => useId());
        expect(result1.current).not.toBe(result2.current);
    });
    it('should return an id with the given prefix', () => {
        const prefix = 'test';
        const { result } = renderHook(() => useId(prefix));
        expect(result.current.startsWith(prefix)).toBe(true);
    });
});
//# sourceMappingURL=useId.spec.js.map