chore: formated tests
Check Deno code / Check Deno code (pull_request) Successful in 5s
Tests / Unit tests (pull_request) Successful in 12s
Tests / Integration tests (pull_request) Successful in 1m9s
Check Deno code / Check Deno code (push) Successful in 6s
Tests / Unit tests (push) Successful in 12s
Tests / Integration tests (push) Successful in 1m13s

This commit was merged in pull request #145.
This commit is contained in:
2026-04-26 19:07:15 +02:00
parent b0930b8da2
commit 714486f43c
16 changed files with 699 additions and 176 deletions
+6 -2
View File
@@ -42,7 +42,9 @@ Deno.test("mock API: GET /ues/:id returns one UE", async () => {
});
Deno.test("mock API: GET /ues/:id 404 when not found", async () => {
mockFetch({ "/ues/99": { status: 404, body: { error: "Ressource introuvable" } } });
mockFetch({
"/ues/99": { status: 404, body: { error: "Ressource introuvable" } },
});
try {
const res = await fetch("http://localhost/api/ues/99");
assertEquals(res.status, 404);
@@ -125,7 +127,9 @@ Deno.test("mock API: DELETE /ues/:id returns 204", async () => {
Deno.test("mock API: DELETE /ues/:id 404 when not found", async () => {
mockFetch({ "/ues/99": { method: "DELETE", status: 404 } });
try {
const res = await fetch("http://localhost/api/ues/99", { method: "DELETE" });
const res = await fetch("http://localhost/api/ues/99", {
method: "DELETE",
});
assertEquals(res.status, 404);
} finally {
restoreFetch();