style: fix deno fmt and lint
Check Deno code / Check Deno code (pull_request) Failing after 8s
Tests / Unit tests (pull_request) Successful in 10s
Tests / Integration tests (pull_request) Successful in 54s

This commit is contained in:
2026-04-26 14:18:55 +02:00
parent 0d2361d7a7
commit 33a1ec9666
4 changed files with 65 additions and 12 deletions
+10 -2
View File
@@ -40,7 +40,12 @@ Deno.test("GET /users - filters by idRole", async () => {
// --- POST /users ---
Deno.test("POST /users - creates a user and returns 201", async () => {
const newUser = { id: "durand.claire", nom: "Durand", prenom: "Claire", idRole: 1 };
const newUser = {
id: "durand.claire",
nom: "Durand",
prenom: "Claire",
idRole: 1,
};
mockFetch({ [BASE]: { method: "POST", status: 201, body: newUser } });
try {
const res = await fetch(BASE, {
@@ -110,7 +115,10 @@ Deno.test("GET /users/{id} - returns a user by id", async () => {
Deno.test("GET /users/{id} - returns 404 for unknown id", async () => {
mockFetch({
[`${BASE}/inconnu`]: { status: 404, body: { error: "Ressource introuvable" } },
[`${BASE}/inconnu`]: {
status: 404,
body: { error: "Ressource introuvable" },
},
});
try {
const res = await fetch(`${BASE}/inconnu`);