mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 13:01:56 +00:00
18 lines
616 B
TypeScript
18 lines
616 B
TypeScript
import { readFileSync } from "node:fs";
|
|
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
describe("custom link", () => {
|
|
const currentDir = path.dirname(fileURLToPath(import.meta.url));
|
|
const filePath = path.join(currentDir, "custom-link.tsx");
|
|
const source = readFileSync(filePath, "utf8");
|
|
|
|
it("renders external or placeholder hrefs as plain anchors instead of next/link", () => {
|
|
expect(source).toContain("isExternalHref");
|
|
expect(source).toContain("hasDynamicHrefPlaceholder");
|
|
expect(source).toContain("<a");
|
|
});
|
|
});
|