aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/widgets/table-of-contents.test.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-04-22 18:33:04 +0200
committerArmand Philippot <git@armandphilippot.com>2022-04-22 18:33:04 +0200
commit947a06bfdfdc5bca62c27fa2ee27f0ab9fefa0ea (patch)
tree3207696494c9564f7a3d9092ce83471717da7dac /src/components/organisms/widgets/table-of-contents.test.tsx
parent52c185d0f23504fc6410cf36285968eff9e7b21f (diff)
chore: add a TableOfContents component
Diffstat (limited to 'src/components/organisms/widgets/table-of-contents.test.tsx')
-rw-r--r--src/components/organisms/widgets/table-of-contents.test.tsx12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/components/organisms/widgets/table-of-contents.test.tsx b/src/components/organisms/widgets/table-of-contents.test.tsx
new file mode 100644
index 0000000..2064f39
--- /dev/null
+++ b/src/components/organisms/widgets/table-of-contents.test.tsx
@@ -0,0 +1,12 @@
+import { render, screen } from '@test-utils';
+import TableOfContents from './table-of-contents';
+
+describe('TableOfContents', () => {
+ it('renders the ToC title', () => {
+ const divEl = document.createElement('div');
+ render(<TableOfContents wrapper={divEl} />);
+ expect(
+ screen.getByRole('heading', { level: 2, name: /Table of Contents/i })
+ ).toBeInTheDocument();
+ });
+});