fix: main index not found in group (#1710)
This commit is contained in:
@@ -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");
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user