From d177e0c7c61845b516d4a361a21739bb6486b9b5 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 1 Apr 2022 19:03:42 +0200 Subject: chore: add a back to top component --- src/components/molecules/buttons/back-to-top.test.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/components/molecules/buttons/back-to-top.test.tsx (limited to 'src/components/molecules/buttons/back-to-top.test.tsx') diff --git a/src/components/molecules/buttons/back-to-top.test.tsx b/src/components/molecules/buttons/back-to-top.test.tsx new file mode 100644 index 0000000..2b3a0a9 --- /dev/null +++ b/src/components/molecules/buttons/back-to-top.test.tsx @@ -0,0 +1,10 @@ +import { render, screen } from '@test-utils'; +import BackToTop from './back-to-top'; + +describe('BackToTop', () => { + it('renders a BackToTop link', () => { + render(); + expect(screen.getByRole('link')).toHaveAccessibleName('Back to top'); + expect(screen.getByRole('link')).toHaveAttribute('href', '/#top'); + }); +}); -- cgit v1.2.3