update created at column test

Signed-off-by: Stephen Glass <stephen@stephen.glass>
This commit is contained in:
Stephen Glass
2024-09-18 22:10:17 -04:00
parent 46986466fe
commit b829833344
@@ -23,12 +23,16 @@ import { DateTime } from 'luxon';
describe('<CreatedAtColumn />', () => {
it('should render the column with the time', async () => {
const props = {
createdAt: DateTime.now().toISO()!,
createdAt: DateTime.now().toISO(),
};
const formattedTime = DateTime.fromISO(props.createdAt).toLocaleString(
DateTime.DATETIME_SHORT_WITH_SECONDS,
);
const { getByText } = await renderInTestApp(<CreatedAtColumn {...props} />);
const text = getByText('0 seconds ago');
const text = getByText(formattedTime);
expect(text).toBeDefined();
});
});