fix: manifest file encoding non-latin chars (#1433)

This commit is contained in:
Marvin Hagemeister
2023-07-10 14:13:01 +02:00
committed by GitHub
parent 1dc3a992f2
commit 1d6e15ba36
5 changed files with 68 additions and 12 deletions
+4 -2
View File
@@ -38,7 +38,8 @@ import * as $32 from "./routes/state-in-props/_middleware.ts";
import * as $33 from "./routes/state-in-props/index.tsx";
import * as $34 from "./routes/static.tsx";
import * as $35 from "./routes/status_overwrite.tsx";
import * as $36 from "./routes/wildcard.tsx";
import * as $36 from "./routes/umlaut-äöüß.tsx";
import * as $37 from "./routes/wildcard.tsx";
import * as $$0 from "./islands/Counter.tsx";
import * as $$1 from "./islands/MultipleCounters.tsx";
import * as $$2 from "./islands/ReturningNull.tsx";
@@ -87,7 +88,8 @@ const manifest = {
"./routes/state-in-props/index.tsx": $33,
"./routes/static.tsx": $34,
"./routes/status_overwrite.tsx": $35,
"./routes/wildcard.tsx": $36,
"./routes/umlaut-äöüß.tsx": $36,
"./routes/wildcard.tsx": $37,
},
islands: {
"./islands/Counter.tsx": $$0,
+3
View File
@@ -0,0 +1,3 @@
export default function Umlaut() {
return <h1>it works</h1>;
}
+25
View File
@@ -879,3 +879,28 @@ Deno.test("renders error boundary", {
assertEquals(text, "it works");
});
});
Deno.test({
name: "Resolves routes with non-latin characters",
async fn() {
await withPageName("./tests/fixture/main.ts", async (page, address) => {
// Check that we can navigate to the page
await page.goto(`${address}/umlaut-äöüß`);
await page.waitForSelector("h1");
const text = await page.$eval("h1", (el) => el.textContent);
assertEquals(text, "it works");
// Check the manifest
const mod = (await import("./fixture/fresh.gen.ts")).default;
assert(
"./routes/umlaut-äöüß.tsx" in mod.routes,
"Umlaut route not found",
);
});
},
sanitizeOps: false,
sanitizeResources: false,
});