-
-
+ Blog
-- Articles, thoughts, and tech stuff. -
-Blog
++ Articles, thoughts, and tech stuff. +
+-
{blogsLatestOrder.map(
({
@@ -69,6 +72,7 @@ export default function BlogPage() {
alt={imgAlt}
width={800}
height={400}
+ loading="eager"
className="aspect-video w-full object-cover transition-transform duration-150 hover:scale-105"
/>
@@ -87,18 +91,19 @@ export default function BlogPage() {
- {tag} ; })}
- {tag} ; })}
-
diff --git a/src/components/sections/article-header.test.tsx b/src/components/sections/article-header.test.tsx
new file mode 100644
index 0000000..6e193e3
--- /dev/null
+++ b/src/components/sections/article-header.test.tsx
@@ -0,0 +1,103 @@
+import { render, screen } from '@testing-library/react';
+import ArticleHeader from './article-header';
+import { BreadcrumbItem } from '@/types/breadcrumb-item';
+import { getSlug } from '@/lib/utils';
+
+describe('Article Header', () => {
+ const breadcrumbItems: BreadcrumbItem[] = [{ label: 'Blog', href: '/blog' }];
+ const blogMeta = {
+ id: 4,
+ title: 'How I Contributed to a Laravel Application Without Knowing Laravel',
+ description:
+ 'Lessons from contributing to a Laravel application, where I discovered that recognizing familiar patterns is often more valuable than starting over.',
+ publishDate: 'August 2026',
+ readTime: '4 min read',
+ tags: ['#laravel', '#learning', '#webdev'],
+ blogUrl: `/blog/${getSlug('How I Contributed to a Laravel Application Without Knowing Laravel')}`,
+ imgUrl: '/img/blog-4.jpg',
+ imgAlt: 'Keyboard caps laid down on a white table.',
+ };
+
+ test('renders the article title', () => {
+ render(
+ -
+
-
{tags.map((tag) => {
return
Blog
- -Blog
+-
{blogList.map(
@@ -42,18 +44,19 @@ const Blog = () => {
-
diff --git a/src/components/sections/breadcrumb.test.tsx b/src/components/sections/breadcrumb.test.tsx
new file mode 100644
index 0000000..f9940c9
--- /dev/null
+++ b/src/components/sections/breadcrumb.test.tsx
@@ -0,0 +1,39 @@
+import { render, screen } from '@testing-library/react';
+import Breadcrumb from './breadcrumb';
+import type { BreadcrumbItem } from '@/types/breadcrumb-item';
+
+describe('Breadcrumb', () => {
+ const items: BreadcrumbItem[] = [
+ { label: 'Blog', href: '/blog' },
+ { label: 'Technology', href: '/blog/technology' },
+ ];
+ test('renders the Home link', () => {
+ render(-
+
-
{tags.map((tag) => {
return