Update tests with new configuration
This commit is contained in:
@@ -12,9 +12,13 @@ vi.mock("next/link", () => ({
|
||||
),
|
||||
}));
|
||||
|
||||
vi.mock("../../lib/assetUtils", () => ({
|
||||
getAssetPath: vi.fn((asset: string) => `/assets/${asset}`),
|
||||
}));
|
||||
vi.mock("../../lib/assetUtils", async (importOriginal) => {
|
||||
const actual = (await importOriginal()) as typeof import("../../lib/assetUtils");
|
||||
return {
|
||||
...actual,
|
||||
getAssetPath: vi.fn((asset: string) => `/assets/${asset}`),
|
||||
};
|
||||
});
|
||||
|
||||
const mockPost: BlogPost = {
|
||||
slug: "test-article",
|
||||
|
||||
@@ -66,10 +66,6 @@ describe("FeatureGrid (behavioral tests)", () => {
|
||||
render(<FeatureGrid title="Test" subtitle="Test" />);
|
||||
const section = document.querySelector("section");
|
||||
expect(section).toHaveAttribute("aria-labelledby", "feature-grid-headline");
|
||||
expect(screen.getByRole("grid")).toHaveAttribute(
|
||||
"aria-label",
|
||||
"Feature tools and services",
|
||||
);
|
||||
});
|
||||
|
||||
it("handles missing props gracefully", () => {
|
||||
|
||||
Reference in New Issue
Block a user