import React from 'react'; import { render } from '@testing-library/react'; import { YearsAgoWithTimestamp, MonthTimeAgo, MonthsTimeAgo, HourTimeAgo, HoursTimeAgo, CurrentTime, CurrentTimeWithIsoDate, } from './time-ago.composition'; describe('Time Ago Component', () => { it('renders correctly - years ago', () => { render(); }); it('should render - years ago', () => { const { getByText } = render(); const text = getByText(/years ago/); // @ts-ignore expect(text).toBeInTheDocument(); }); it('renders correctly - month ago', () => { render(); }); it('should render - month ago', () => { const { getByText } = render(); const text = getByText(/month ago/); // @ts-ignore expect(text).toBeInTheDocument(); }); it('renders correctly - months ago', () => { render(); }); it('should render - months ago', () => { const { getByText } = render(); const text = getByText(/months ago/); // @ts-ignore expect(text).toBeInTheDocument(); }); it('renders correctly - hour ago', () => { render(); }); it('should render - hour ago', () => { const { getByText } = render(); const text = getByText(/hour ago/); // @ts-ignore expect(text).toBeInTheDocument(); }); it('renders correctly - hours ago', () => { render(); }); it('should render - hours ago', () => { const { getByText } = render(); const text = getByText(/hours ago/); // @ts-ignore expect(text).toBeInTheDocument(); }); it('renders correctly - just now', () => { render(); }); it('should render - just now', () => { const { getByText } = render(); const text = getByText(/just now/); // @ts-ignore expect(text).toBeInTheDocument(); }); it('renders correctly - just now with ISO date', () => { render(); }); it('should render - just now', () => { const { getByText } = render(); const text = getByText(/just now/); // @ts-ignore expect(text).toBeInTheDocument(); }); });