fix: error on duplicate partial name (#1958)

This commit is contained in:
Marvin Hagemeister
2023-10-18 20:04:37 +02:00
committed by GitHub
parent 4c59f9df65
commit 7896005329
5 changed files with 199 additions and 141 deletions
+18
View File
@@ -1405,3 +1405,21 @@ Deno.test("nested partials are able to be updated", async () => {
},
);
});
Deno.test("errors on duplicate partial name", async () => {
await withPageName(
"./tests/fixture_partials/main.ts",
async (page, address) => {
await page.goto(`${address}/duplicate_name`);
await page.waitForSelector(".swap-link");
const logs: string[] = [];
page.on("console", (msg) => logs.push(msg.text()));
await Promise.all([
page.waitForResponse((res) => res.status() === 500),
page.click(".swap-link"),
]);
},
);
});