diff --git a/apps/blog/e2e/notfound.spec.ts b/apps/blog/e2e/notfound.spec.ts new file mode 100644 index 0000000..df2645b --- /dev/null +++ b/apps/blog/e2e/notfound.spec.ts @@ -0,0 +1,6 @@ +import { expect, test } from "@playwright/test" + +test("Should return 404 for invalid routes", async ({ page }) => { + const response = await page.goto("/path/that/does/not/exist") + expect(response?.status()).toEqual(404) +}) diff --git a/apps/main/e2e/notfound.spec.ts b/apps/main/e2e/notfound.spec.ts new file mode 100644 index 0000000..df2645b --- /dev/null +++ b/apps/main/e2e/notfound.spec.ts @@ -0,0 +1,6 @@ +import { expect, test } from "@playwright/test" + +test("Should return 404 for invalid routes", async ({ page }) => { + const response = await page.goto("/path/that/does/not/exist") + expect(response?.status()).toEqual(404) +}) diff --git a/apps/portfolio/e2e/notfound.spec.ts b/apps/portfolio/e2e/notfound.spec.ts new file mode 100644 index 0000000..df2645b --- /dev/null +++ b/apps/portfolio/e2e/notfound.spec.ts @@ -0,0 +1,6 @@ +import { expect, test } from "@playwright/test" + +test("Should return 404 for invalid routes", async ({ page }) => { + const response = await page.goto("/path/that/does/not/exist") + expect(response?.status()).toEqual(404) +})