Skip to content

Commit 2eb5d21

Browse files
committed
fix: skills and education pdf tests.
1 parent bec3595 commit 2eb5d21

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/theme/default/components/pdf/Education.test.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ describe("Education", () => {
4040
});
4141

4242
it("handles empty education array", () => {
43-
render(<Education education={[]} />);
44-
expect(screen.getByText("Education")).toBeInTheDocument();
45-
// Should still render the section title but no schools
43+
const { container } = render(<Education education={[]} />);
44+
expect(container.firstChild).toBeNull();
4645
});
4746

4847
it("handles education entry without school", () => {
@@ -53,8 +52,8 @@ describe("Education", () => {
5352
},
5453
];
5554

56-
render(<Education education={educationWithoutSchool} />);
57-
expect(screen.getByText("Education")).toBeInTheDocument();
55+
const { container } = render(<Education education={educationWithoutSchool} />);
56+
expect(container.firstChild).toBeNull();
5857
expect(
5958
screen.queryByText(new RegExp(educationWithoutSchool[0].degree)),
6059
).not.toBeInTheDocument();

src/theme/default/components/pdf/Skills.test.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ describe("Skills", () => {
3535
});
3636

3737
it("handles empty skills array", () => {
38-
render(<Skills skillsForUser={[]} />);
39-
expect(screen.getByText("Skills")).toBeInTheDocument();
40-
// Should still render the section title but no skills
38+
const { container } = render(<Skills skillsForUser={[]} />);
39+
expect(container.firstChild).toBeNull();
4140
});
4241

4342
it("renders skills in maroon color", () => {

0 commit comments

Comments
 (0)