From f5320ceec3ac4b5efdc58ec5091b9dce057fce3e Mon Sep 17 00:00:00 2001 From: SegaraRai Date: Thu, 11 Jul 2024 00:15:21 +0900 Subject: [PATCH] chore: format codes --- tests/cases/circular.test.ts | 36 +++++++++++++++++++++++++++--------- tests/cases/hoisted.test.ts | 16 ++++++++++++---- tests/cases/module.test.ts | 16 ++++++++++++---- 3 files changed, 51 insertions(+), 17 deletions(-) diff --git a/tests/cases/circular.test.ts b/tests/cases/circular.test.ts index 5eaa282..e1c506a 100644 --- a/tests/cases/circular.test.ts +++ b/tests/cases/circular.test.ts @@ -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(` @@ -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); diff --git a/tests/cases/hoisted.test.ts b/tests/cases/hoisted.test.ts index 9b8157e..c9cadda 100644 --- a/tests/cases/hoisted.test.ts +++ b/tests/cases/hoisted.test.ts @@ -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(` diff --git a/tests/cases/module.test.ts b/tests/cases/module.test.ts index 88f7177..2f895ea 100644 --- a/tests/cases/module.test.ts +++ b/tests/cases/module.test.ts @@ -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");