blob: 1087fbbe2d1489ad6a86c45e935bc4effc6e287a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import { render, screen } from '../../../../tests/utils';
import { getFormattedDate } from '../../../utils/helpers';
import { Meta } from './meta';
const data = {
publication: { date: '2022-04-09' },
thematics: [
<a key="category1" href="#">
Category 1
</a>,
<a key="category2" href="#">
Category 2
</a>,
],
};
describe('Meta', () => {
it('format a date string', () => {
render(<Meta data={data} />);
expect(
screen.getByText(getFormattedDate(data.publication.date))
).toBeInTheDocument();
});
});
|