diff --git a/packages/core/test/apps/basic/src/entry.ts b/packages/core/test/apps/basic/src/entry.ts index 60b9273..80928e7 100644 --- a/packages/core/test/apps/basic/src/entry.ts +++ b/packages/core/test/apps/basic/src/entry.ts @@ -18,6 +18,7 @@ app.get("/without-locals", (ctx) => { }); app.get("/client-assets", (ctx) => ctx.render("client-assets/page")); +app.get("/script/inline", (ctx) => ctx.render("script-inline")); app.get("/css/inline", (ctx) => ctx.render("css/inline")); app.get("/css/nested", (ctx) => ctx.render("css/nested/index")); diff --git a/packages/core/test/apps/basic/src/views/script-inline.svelte b/packages/core/test/apps/basic/src/views/script-inline.svelte new file mode 100644 index 0000000..177ea59 --- /dev/null +++ b/packages/core/test/apps/basic/src/views/script-inline.svelte @@ -0,0 +1,30 @@ + + + + + + Client assets + + + + +

+ + + + + diff --git a/packages/core/test/apps/basic/test/client.spec.ts b/packages/core/test/apps/basic/test/client.spec.ts index 554a1b7..d961a0c 100644 --- a/packages/core/test/apps/basic/test/client.spec.ts +++ b/packages/core/test/apps/basic/test/client.spec.ts @@ -24,6 +24,17 @@ test.describe("Views", () => { await dec.click(); expect(await text.textContent()).toBe("0"); }); + + test("supports inline script tags", async ({ page }) => { + await page.goto("/script/inline"); + const inc = page.getByTestId("inc"); + const dec = page.getByTestId("dec"); + const text = page.getByTestId("text"); + await inc.click(); + expect(await text.textContent()).toBe("1"); + await dec.click(); + expect(await text.textContent()).toBe("0"); + }); }); test.describe("CSS", () => {