This commit is contained in:
1 parent
9cdd0b4000
commit
b1a60adbc2
2 files changed
+14
-9
No files matched your search
@@ -1,3 +1,5 @@
|
||||
import { readFileSync } from "node:fs";
|
||||
import { resolve } from "node:path";
|
||||
import { renderToStaticMarkup } from "react-dom/server";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { CmsInfoPopup } from "@/components/cms-info-popup";
|
||||
@@ -5,6 +7,9 @@ import { CmsInfoPopup } from "@/components/cms-info-popup";
|
||||
describe("CmsInfoPopup", () => {
|
||||
it("renders the footer trigger", () => {
|
||||
const html = renderToStaticMarkup(<CmsInfoPopup />);
|
||||
expect(html).toContain("CMS Info");
|
||||
const source = readFileSync(resolve(process.cwd(), "src/components/cms-info-popup.tsx"), "utf8");
|
||||
expect(html).toContain("EpicNext Info");
|
||||
expect(source).toContain(">EpicNext<");
|
||||
expect(source).toContain("Modern Next.js CMS");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user