style: fix deno fmt and lint
This commit is contained in:
@@ -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`);
|
||||
|
||||
Reference in New Issue
Block a user