Skip to content

Commit

Permalink
chore: format codes
Browse files Browse the repository at this point in the history
  • Loading branch information
SegaraRai committed Jul 10, 2024
1 parent 40cb04a commit f5320ce
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 17 deletions.
36 changes: 27 additions & 9 deletions tests/cases/circular.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,24 @@ it("should handle circular dependencies with hoisted mode", async ({
const { files } = await runBuild(TEST_INPUT_COMPONENTS);

expect(
files["[intermediate] tailwindcss/__x00__test/entry.js/hoisted.layer1.dl.css?inline"]
files[
"[intermediate] tailwindcss/__x00__test/entry.js/hoisted.layer1.dl.css?inline"
]
).toContain(".test-c-1");
expect(
files["[intermediate] tailwindcss/__x00__test/entry.js/hoisted.layer1.dl.css?inline"]
files[
"[intermediate] tailwindcss/__x00__test/entry.js/hoisted.layer1.dl.css?inline"
]
).toContain(".test-c-2");
expect(
files["[intermediate] tailwindcss/__x00__test/entry.js/hoisted.layer1.dl.css?inline"]
files[
"[intermediate] tailwindcss/__x00__test/entry.js/hoisted.layer1.dl.css?inline"
]
).toContain(".test-c-3");
expect(
files["[intermediate] tailwindcss/__x00__test/entry.js/hoisted.layer1.dl.css?inline"]
files[
"[intermediate] tailwindcss/__x00__test/entry.js/hoisted.layer1.dl.css?inline"
]
).toContain(".test-c-9");

expect(files).toMatchInlineSnapshot(`
Expand Down Expand Up @@ -236,19 +244,29 @@ it("should handle circular dependencies with module mode", async ({
});

expect(
files["[intermediate] tailwindcss/__x00__test/entry.js/module.layer2.l.css?inline"]
files[
"[intermediate] tailwindcss/__x00__test/entry.js/module.layer2.l.css?inline"
]
).not.toContain(".test-");
expect(
files["[intermediate] tailwindcss/__x00__test/a.js/module.layer2.l.css?inline"]
files[
"[intermediate] tailwindcss/__x00__test/a.js/module.layer2.l.css?inline"
]
).toContain(".test-u-1");
expect(
files["[intermediate] tailwindcss/__x00__test/a.js/module.layer2.l.css?inline"]
files[
"[intermediate] tailwindcss/__x00__test/a.js/module.layer2.l.css?inline"
]
).toContain(".test-u-9");
expect(
files["[intermediate] tailwindcss/__x00__test/b.js/module.layer2.l.css?inline"]
files[
"[intermediate] tailwindcss/__x00__test/b.js/module.layer2.l.css?inline"
]
).toContain(".test-u-2");
expect(
files["[intermediate] tailwindcss/__x00__test/c.js/module.layer2.l.css?inline"]
files[
"[intermediate] tailwindcss/__x00__test/c.js/module.layer2.l.css?inline"
]
).toContain(".test-u-3");

expect(warnings).toHaveLength(0);
Expand Down
16 changes: 12 additions & 4 deletions tests/cases/hoisted.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,24 @@ export default x + " test-c-2";
]);

expect(
files["[intermediate] tailwindcss/__x00__test/entry.js/hoisted.layer1.dl.css?inline"]
files[
"[intermediate] tailwindcss/__x00__test/entry.js/hoisted.layer1.dl.css?inline"
]
).toContain(".test-c-1");
expect(
files["[intermediate] tailwindcss/__x00__test/entry.js/hoisted.layer1.dl.css?inline"]
files[
"[intermediate] tailwindcss/__x00__test/entry.js/hoisted.layer1.dl.css?inline"
]
).toContain(".test-c-2");
expect(
files["[intermediate] tailwindcss/__x00__test/entry.js/hoisted.layer1.dl.css?inline"]
files[
"[intermediate] tailwindcss/__x00__test/entry.js/hoisted.layer1.dl.css?inline"
]
).toMatch(/\.test-c-9/);
expect(
files["[intermediate] tailwindcss/__x00__test/entry.js/hoisted.layer1.dl.css?inline"]
files[
"[intermediate] tailwindcss/__x00__test/entry.js/hoisted.layer1.dl.css?inline"
]
).not.toMatch(/\.test-c-9.+\.test-c-9/);

expect(files).toMatchInlineSnapshot(`
Expand Down
16 changes: 12 additions & 4 deletions tests/cases/module.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,21 @@ export default x + " test-u-2";
]);

const modA =
files["[intermediate] tailwindcss/__x00__test/a.js/module.layer2.l.css?inline"];
files[
"[intermediate] tailwindcss/__x00__test/a.js/module.layer2.l.css?inline"
];
const modB =
files["[intermediate] tailwindcss/__x00__test/b.js/module.layer2.l.css?inline"];
files[
"[intermediate] tailwindcss/__x00__test/b.js/module.layer2.l.css?inline"
];
const modX =
files["[intermediate] tailwindcss/__x00__test/x.js/module.layer2.l.css?inline"];
files[
"[intermediate] tailwindcss/__x00__test/x.js/module.layer2.l.css?inline"
];
const modEntry =
files["[intermediate] tailwindcss/__x00__test/entry.js/module.layer2.l.css?inline"];
files[
"[intermediate] tailwindcss/__x00__test/entry.js/module.layer2.l.css?inline"
];

expect(modA).toContain(".test-u-1");
expect(modA).not.toContain(".test-u-2");
Expand Down

0 comments on commit f5320ce

Please sign in to comment.