© 2026 Hedgehog Software, LLC
test("GET: all car brands", async () => { const res = await app.request("/api/brand"); const body = await res.json(); // [{ id: 0, name: "BMW" }, { id: 1, name: "Audi" }] });
TypeError: Failed to construct 'Request': Invalid URL "/api/brand"
test("POST: create new car brand", async () => { ... ... const req = new Request("/api/brand", { method: "POST", body: formData, }); await app.request(req); ... ... /* 41 | const req = new Request("/api/brand", { ^ TypeError: Failed to construct 'Request': Invalid URL "/api/brand" code: "ERR_INVALID_URL" */ });
http://localhost:3000/api/brand