fix: main index not found in group (#1710)

This commit is contained in:
Marvin Hagemeister
2023-09-05 12:16:19 +02:00
committed by GitHub
parent c767cc5067
commit ac5e4c5ca1
7 changed files with 64 additions and 0 deletions
+13
View File
@@ -2,6 +2,7 @@ import { assertEquals } from "$std/testing/asserts.ts";
import {
assertTextMany,
fetchHtml,
parseHtml,
waitForText,
withFresh,
withPageName,
@@ -71,3 +72,15 @@ Deno.test("does not treat files in (_...) as routes", async () => {
},
);
});
Deno.test("resolve index route in group /(group)/index.tsx", async () => {
await withFresh(
"./tests/fixture_group_index/main.ts",
async (address) => {
const res = await fetch(`${address}`);
assertEquals(res.status, 200);
const doc = parseHtml(await res.text());
assertEquals(doc.querySelector("h1")?.textContent, "it works");
},
);
});