From 00f147a7a687d5772bcc538bc606cfff972178cd Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Thu, 12 Oct 2023 17:24:13 +0200 Subject: feat(components): add a Time component Instead of using helpers functions to format the date each time we need to use a time element, it makes more sense to create a new component dedicated to this task. --- src/components/atoms/layout/time/time.test.tsx | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/components/atoms/layout/time/time.test.tsx (limited to 'src/components/atoms/layout/time/time.test.tsx') diff --git a/src/components/atoms/layout/time/time.test.tsx b/src/components/atoms/layout/time/time.test.tsx new file mode 100644 index 0000000..910285d --- /dev/null +++ b/src/components/atoms/layout/time/time.test.tsx @@ -0,0 +1,39 @@ +import { describe, expect, it } from '@jest/globals'; +import { render, screen as rtlScreen } from '../../../../../tests/utils'; +import { settings } from '../../../../utils/config'; +import { Time } from './time'; + +describe('Time', () => { + it('renders a date wrapped in a time element', () => { + const date = '2022'; + + render(