diff --git a/src/app/[lang]/__tests__/card.test.tsx b/src/app/[lang]/__tests__/card.test.tsx index 3ba6f57e..b0a57475 100644 --- a/src/app/[lang]/__tests__/card.test.tsx +++ b/src/app/[lang]/__tests__/card.test.tsx @@ -5,6 +5,7 @@ import Article from '../Article'; describe('Article component', () => { it('should render correct element', () => { + // Arrange const data: DataFrontmatter = { id: 'test_id', title: 'title test', @@ -17,13 +18,11 @@ describe('Article component', () => { tags: ['tag_A', 'tag_B'], description: 'description test', }; - render(
); - const article = screen.getByRole('article'); const image = screen.getByRole('img'); const heading = screen.getByRole('heading'); - + // Assert expect(article).toBeInTheDocument(); expect(image).toHaveAttribute('src', data.image); expect(image).toHaveAttribute('alt', `${data.title} cover`); diff --git a/src/app/[lang]/__tests__/footer.test.tsx b/src/app/[lang]/__tests__/footer.test.tsx index 089cbbad..f64fe575 100644 --- a/src/app/[lang]/__tests__/footer.test.tsx +++ b/src/app/[lang]/__tests__/footer.test.tsx @@ -3,12 +3,11 @@ import Footer from '../Footer'; describe('Footer component', () => { it('should render correct element', () => { + // Arrange const footerCopyright = 'footer copyright'; - render(