style: fix deno fmt and lint
Check Deno code / Check Deno code (pull_request) Successful in 6s
Tests / Unit tests (pull_request) Successful in 11s
Tests / Integration tests (pull_request) Successful in 58s

This commit is contained in:
2026-04-26 14:18:55 +02:00
committed by djalim
parent a791b8813d
commit 3ac514a33d
3 changed files with 62 additions and 11 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`);