Update
This commit is contained in:
@ -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")
|
||||
);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user