From 2cc0956efb222f884569db74b027f4352ec23cd1 Mon Sep 17 00:00:00 2001 From: Aaron Yarborough <3855819+AaronJY@users.noreply.github.com> Date: Sun, 9 Mar 2025 18:47:09 +0000 Subject: [PATCH] chore: remove tests --- __test__/components/Article.test.jsx | 46 --------------- __test__/components/ExsternalLink.test.jsx | 28 --------- __test__/components/Footer.test.jsx | 10 ---- __test__/components/Grid.test.jsx | 16 ----- __test__/components/Header.test.jsx | 19 ------ __test__/components/Resume.test.jsx | 63 -------------------- __test__/layouts/DefaultLayout.test.jsx | 29 --------- __test__/pages/Writing.test.jsx | 69 ---------------------- package.json | 2 +- 9 files changed, 1 insertion(+), 281 deletions(-) delete mode 100644 __test__/components/Article.test.jsx delete mode 100644 __test__/components/ExsternalLink.test.jsx delete mode 100644 __test__/components/Footer.test.jsx delete mode 100644 __test__/components/Grid.test.jsx delete mode 100644 __test__/components/Header.test.jsx delete mode 100644 __test__/components/Resume.test.jsx delete mode 100644 __test__/layouts/DefaultLayout.test.jsx delete mode 100644 __test__/pages/Writing.test.jsx diff --git a/__test__/components/Article.test.jsx b/__test__/components/Article.test.jsx deleted file mode 100644 index a8ba778..0000000 --- a/__test__/components/Article.test.jsx +++ /dev/null @@ -1,46 +0,0 @@ -/* eslint-env jest */ -import { render } from '@testing-library/react' -import Article from '../../src/components/Article/Article' -import '@testing-library/jest-dom' -import { formatDate } from '@/lib/helpers' - -describe('Article', () => { - it('renders title', () => { - const props = generateArticleProps() - const { getByText } = render(
) - const titleElement = getByText(props.attributes.title) - expect(titleElement).toBeInTheDocument() - }) - - it('renders description', () => { - const props = generateArticleProps() - const { getByText } = render(
) - const descriptionElement = getByText(props.attributes.desc) - expect(descriptionElement).toBeInTheDocument() - }) - - it('renders pubdate if available', () => { - const props = generateArticleProps() - const { getByText } = render(
) - const pubdateElement = getByText(formatDate(props.attributes.pubdate)) - expect(pubdateElement).toBeInTheDocument() - }) - - it('renders content', () => { - const props = generateArticleProps() - const { container } = render(
) - const contentElement = container.querySelector('[data-test=content]') - expect(contentElement.innerHTML).toBe(props.html) - }) -}) - -function generateArticleProps () { - return { - attributes: { - title: 'My title', - desc: 'My description', - pubdate: new Date().toUTCString() - }, - html: '

This is my content!

' - } -} diff --git a/__test__/components/ExsternalLink.test.jsx b/__test__/components/ExsternalLink.test.jsx deleted file mode 100644 index 506d457..0000000 --- a/__test__/components/ExsternalLink.test.jsx +++ /dev/null @@ -1,28 +0,0 @@ -/* eslint-env jest */ -import { render, screen } from '@testing-library/react' -import ExternalLink from '../../src/components/ExternalLink/ExternalLink' -import '@testing-library/jest-dom' - -describe('ExternalLink', () => { - const props = { - href: 'https://example.com', - children: 'Test Link' - } - - it('renders without crashing', () => { - render() - }) - - it('renders correct href and rel attributes', () => { - render() - const link = screen.getByText(props.children) - expect(link).toHaveAttribute('href', props.href) - expect(link).toHaveAttribute('rel', 'nofollow noopener') - expect(link).toHaveAttribute('target', '_blank') - }) - - it('renders children correctly', () => { - render() - expect(screen.getByText(props.children)).toBeInTheDocument() - }) -}) diff --git a/__test__/components/Footer.test.jsx b/__test__/components/Footer.test.jsx deleted file mode 100644 index b6882e6..0000000 --- a/__test__/components/Footer.test.jsx +++ /dev/null @@ -1,10 +0,0 @@ -/* eslint-env jest */ -import { render } from '@testing-library/react' -import '@testing-library/jest-dom' -import Footer from '@/components/Footer/Footer' - -describe('Footer', () => { - it('renders without crashing', () => { - render(