chore: install Playwright and add E2E test configuration
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import { beforeEach, describe, expect, it } from "bun:test";
|
||||
import { Hono } from "hono";
|
||||
import { _resetForTesting, rateLimit } from "../../src/server/middleware/rateLimit";
|
||||
import {
|
||||
_resetForTesting,
|
||||
rateLimit,
|
||||
} from "../../src/server/middleware/rateLimit";
|
||||
|
||||
function createApp() {
|
||||
const app = new Hono();
|
||||
|
||||
@@ -48,7 +48,9 @@ describe("Invalid ID parameter handling", () => {
|
||||
|
||||
describe("categories", () => {
|
||||
it("DELETE /api/categories/abc returns 400", async () => {
|
||||
const res = await app.request("/api/categories/abc", { method: "DELETE" });
|
||||
const res = await app.request("/api/categories/abc", {
|
||||
method: "DELETE",
|
||||
});
|
||||
expect(res.status).toBe(400);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user