This commit is contained in:
Alex
2024-07-06 02:49:25 -04:00
parent 2b3812b2ba
commit d4404f7ae2
11 changed files with 267 additions and 119 deletions

View File

@ -51,4 +51,22 @@ describe("babel-tailwind", () => {
].join("\n")
);
});
it("passes through `group` className", async () => {
const { files } = await compileESBuild({
clsx: "emotion",
expectFiles: 2,
javascript: `
import { tw } from "@aet/tailwind/macro";
export default tw\`group hover:text-center\`;
`,
});
const clsName = getClassName("group hover:text-center");
expect(files.js.text).toContain(`"${clsName} group"`);
expect(files.css.text).toMatch(
[`.${clsName}:hover {`, " text-align: center;", "}"].join("\n")
);
});
});