diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-11-20 12:27:46 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-11-20 19:32:09 +0100 |
| commit | 70b4f633a6fbedb58c8b9134ac64ede854d489de (patch) | |
| tree | c757bb12ad9a588e23b25cdb8b46710ac14dbcb1 /src/components/templates/page/page-sidebar.test.tsx | |
| parent | 9a481f066e1427d53a06cf7aeec525a745abf03f (diff) | |
refactor(components): replace PageLayout template with Page
* split pages in smaller components (it is both easier to maintain and
more readable, we avoid the use of fragments in pages directory)
* extract breadcrumbs from article tag (the navigation is not related
to the page contents)
* remove useReadingTime hook
* remove layout options except `isHome`
Diffstat (limited to 'src/components/templates/page/page-sidebar.test.tsx')
| -rw-r--r-- | src/components/templates/page/page-sidebar.test.tsx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/components/templates/page/page-sidebar.test.tsx b/src/components/templates/page/page-sidebar.test.tsx new file mode 100644 index 0000000..93bb57f --- /dev/null +++ b/src/components/templates/page/page-sidebar.test.tsx @@ -0,0 +1,14 @@ +import { describe, expect, it } from '@jest/globals'; +import { render, screen as rtlScreen } from '@testing-library/react'; +import { PageSidebar } from './page-sidebar'; + +describe('PageSidebar', () => { + it('renders its contents', () => { + const body = + 'Repellendus dignissimos quos dolores sunt pariatur rem optio qui aut. Dolore optio est quam tenetur minus. Dolorem voluptas id maiores rerum velit omnis esse impedit. Unde reiciendis nisi nostrum et. Quia accusamus asperiores. Commodi est provident sequi eaque ipsa ut necessitatibus.'; + + render(<PageSidebar>{body}</PageSidebar>); + + expect(rtlScreen.getByText(body)).toBeInTheDocument(); + }); +}); |
