feat: prevent duplicate routes when generating manifest (#1410)

This commit is contained in:
Reed von Redwitz
2023-07-11 14:39:48 +02:00
committed by GitHub
parent d4c2258eb6
commit 9177d9afc3
9 changed files with 146 additions and 21 deletions
+18
View File
@@ -0,0 +1,18 @@
import { startFreshServerExpectErrors } from "./test_utils.ts";
import { dirname, join } from "$std/path/mod.ts";
import { assertStringIncludes } from "./deps.ts";
const dir = dirname(import.meta.url);
Deno.test({
name: "route-conflicts",
async fn() {
const errorMessage = await startFreshServerExpectErrors({
args: ["run", "-A", join(dir, "./fixture_route_analysis/dev.ts")],
});
assertStringIncludes(
errorMessage,
"Error: Route conflict detected. Multiple files have the same name",
);
},
});