From c5b516e2c933e77b2550fe6becebacb3fbdd30eb Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Wed, 11 May 2022 19:53:09 +0200
Subject: chore: add the Blog index page

---
 src/components/organisms/layout/summary.test.tsx | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

(limited to 'src/components/organisms/layout/summary.test.tsx')

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();
   });
 });
-- 
cgit v1.2.3

