diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-05-11 19:53:09 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-05-13 15:46:05 +0200 |
| commit | c5b516e2c933e77b2550fe6becebacb3fbdd30eb (patch) | |
| tree | ff685c6c21d5938512c6a2cd60eb92242a703059 /src/components/organisms/layout/summary.test.tsx | |
| parent | 9c8921db92d16b07ffc2a63ff3c80c4dcdd9ff9d (diff) | |
chore: add the Blog index page
Diffstat (limited to 'src/components/organisms/layout/summary.test.tsx')
| -rw-r--r-- | src/components/organisms/layout/summary.test.tsx | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/components/organisms/layout/summary.test.tsx b/src/components/organisms/layout/summary.test.tsx index 09b797c..9e34254 100644 --- a/src/components/organisms/layout/summary.test.tsx +++ b/src/components/organisms/layout/summary.test.tsx @@ -12,17 +12,13 @@ const excerpt = 'Perspiciatis quasi libero nemo non eligendi nam minima. Deleniti expedita tempore. Praesentium explicabo molestiae eaque consectetur vero. Quae nostrum quisquam similique. Ut hic est quas ut esse quisquam nobis.'; const meta = { - publication: { date: '2022-04-11' }, - readingTime: '5 minutes', + dates: { publication: '2022-04-11' }, + readingTime: { wordsCount: excerpt.split(' ').length }, thematics: [ - <a key="cat-1" href="#"> - Cat 1 - </a>, - <a key="cat-2" href="#"> - Cat 2 - </a>, + { id: 'cat-1', name: 'Cat 1', url: '#' }, + { id: 'cat-2', name: 'Cat 2', url: '#' }, ], - commentsCount: '1 comment', + commentsCount: 1, }; const title = 'Odio odit necessitatibus'; @@ -77,6 +73,6 @@ describe('Summary', () => { it('renders some meta', () => { render(<Summary excerpt={excerpt} meta={meta} title={title} url={url} />); - expect(screen.getByText(meta.readingTime)).toBeInTheDocument(); + expect(screen.getByText(meta.thematics[0].name)).toBeInTheDocument(); }); }); |
