Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
phonzammi committed Nov 13, 2024
1 parent 290a367 commit bfb6b79
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions packages/tests/tests/FRAMEWORK+CSS.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,21 @@ import path from "node:path";

export const matrix = [["solid", "react", "vue"], ["tailwindcss", "daisyui", "panda-css"], "eslint"];

await describeBati(({ test, expect, fetch, context }) => {
await describeBati(({ test, expect, fetch, testMatch, context }) => {
test("home", async () => {
const res = await fetch("/");
expect(res.status).toBe(200);
expect(await res.text()).not.toContain('{"is404":true}');
});

test("daisyui", async () => {
const content = await readFile("tailwind.config.ts", "utf-8");
expect(content.includes("daisyui")).toBe(context.flags.includes("daisyui"));
});

test("panda-css", async () => {
expect(existsSync(path.join(process.cwd(), "panda.config.ts"))).toBe(true);
expect(existsSync(path.join(process.cwd(), "layouts", "panda.css"))).toBe(true);
testMatch<typeof matrix>("config exists", {
daisyui: async () => {
const content = await readFile("tailwind.config.ts", "utf-8");
expect(content.includes("daisyui")).toBe(context.flags.includes("daisyui"));
},
"panda-css": async () => {
expect(existsSync(path.join(process.cwd(), "panda.config.ts"))).toBe(true);
expect(existsSync(path.join(process.cwd(), "layouts", "panda.css"))).toBe(true);
},
});
});

0 comments on commit bfb6b79

Please sign in to comment.