Skip to content

Commit 9da6b0b

Browse files
committed
test(oxfmt): remove unnecessary timeout from Tailwind CSS test (#19050)
## Summary - Remove the 30s timeout and associated comment from the first Tailwind CSS sorting test, added in #18339 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent 65fbfd8 commit 9da6b0b

1 file changed

Lines changed: 14 additions & 20 deletions

File tree

apps/oxfmt/test/api/sort_tailwindcss.test.ts

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,20 @@ import { describe, expect, it } from "vitest";
22
import { format } from "../../dist/index.js";
33

44
describe("Tailwind CSS Sorting", () => {
5-
// First test triggers Tailwind CSS initialization which is slow on Windows CI
6-
// https://github.com/oxc-project/oxc/issues/18072
7-
it(
8-
"should sort Tailwind classes when experimentalTailwindcss is enabled",
9-
{ timeout: 30_000 },
10-
async () => {
11-
// Unsorted: p-4 comes before flex
12-
const input = `const A = <div className="p-4 flex bg-red-500 text-white">Hello</div>;`;
13-
14-
const result = await format("test.tsx", input, {
15-
experimentalTailwindcss: {},
16-
});
17-
18-
// After sorting, flex should come before p-4 (display before spacing)
19-
// The exact order of bg-red-500 and text-white may vary by Tailwind version
20-
expect(result.code).toContain('className="flex');
21-
expect(result.code).not.toContain('className="p-4 flex'); // p-4 should not be before flex
22-
expect(result.errors).toStrictEqual([]);
23-
},
24-
);
5+
it("should sort Tailwind classes when experimentalTailwindcss is enabled", async () => {
6+
// Unsorted: p-4 comes before flex
7+
const input = `const A = <div className="p-4 flex bg-red-500 text-white">Hello</div>;`;
8+
9+
const result = await format("test.tsx", input, {
10+
experimentalTailwindcss: {},
11+
});
12+
13+
// After sorting, flex should come before p-4 (display before spacing)
14+
// The exact order of bg-red-500 and text-white may vary by Tailwind version
15+
expect(result.code).toContain('className="flex');
16+
expect(result.code).not.toContain('className="p-4 flex'); // p-4 should not be before flex
17+
expect(result.errors).toStrictEqual([]);
18+
});
2519

2620
it("should NOT sort Tailwind classes when experimentalTailwindcss is disabled (default)", async () => {
2721
const input = `const A = <div className="p-4 flex bg-red-500 text-white">Hello</div>;`;

0 commit comments

Comments
 (0)