Remove unnecessary props and data structure

This commit is contained in:
adilallo
2025-09-05 08:09:44 -06:00
parent fc096129dd
commit 93182e6c2d
8 changed files with 21 additions and 279 deletions
-21
View File
@@ -3,7 +3,6 @@ import {
contentProcessor,
getAllPosts,
getBlogStats,
getAllTags,
} from "../../lib/contentProcessor.js";
describe("Content Processor", () => {
@@ -25,14 +24,6 @@ describe("Content Processor", () => {
it("should extract blog statistics", () => {
const stats = getBlogStats();
expect(stats.totalPosts).toBeGreaterThan(0);
expect(stats.totalTags).toBeGreaterThan(0);
expect(stats.totalWords).toBeGreaterThan(0);
});
it("should extract tags from posts", () => {
const tags = getAllTags();
expect(Array.isArray(tags)).toBe(true);
expect(tags.length).toBeGreaterThan(0);
});
});
@@ -44,8 +35,6 @@ describe("Content Processor", () => {
expect(firstPost).toHaveProperty("frontmatter");
expect(firstPost).toHaveProperty("content");
expect(firstPost).toHaveProperty("htmlContent");
expect(firstPost).toHaveProperty("wordCount");
expect(firstPost).toHaveProperty("readingTime");
expect(firstPost).toHaveProperty("headings");
expect(firstPost).toHaveProperty("tableOfContents");
});
@@ -58,16 +47,6 @@ describe("Content Processor", () => {
expect(typeof firstPost.slug).toBe("string");
expect(firstPost.slug.length).toBeGreaterThan(0);
});
it("should calculate word count and reading time", () => {
const posts = getAllPosts();
const firstPost = posts[0];
expect(firstPost.wordCount).toBeGreaterThan(0);
expect(firstPost.readingTime).toBeGreaterThan(0);
expect(typeof firstPost.wordCount).toBe("number");
expect(typeof firstPost.readingTime).toBe("number");
});
});
describe("Content Enhancement", () => {