style: fix deno fmt and lint

This commit is contained in:
2026-04-26 14:18:55 +02:00
committed by djalim
parent 222c3237f0
commit b3eb1b60a5
4 changed files with 69 additions and 3 deletions
+4 -1
View File
@@ -57,7 +57,10 @@ Deno.test({
async fn() {
await truncateAll();
const res = await promotionsHandler.POST!(
makeJsonRequest("/promotions", "POST", { idPromo: "INFO3-2025", annee: "2025" }),
makeJsonRequest("/promotions", "POST", {
idPromo: "INFO3-2025",
annee: "2025",
}),
makeEmployeeContext(),
);
assertEquals(res.status, 201);
+9 -2
View File
@@ -41,7 +41,12 @@ Deno.test("mock API: GET /promotions/:id returns one", async () => {
});
Deno.test("mock API: GET /promotions/:id 404 when not found", async () => {
mockFetch({ "/promotions/UNKNOWN": { status: 404, body: { error: "Ressource introuvable" } } });
mockFetch({
"/promotions/UNKNOWN": {
status: 404,
body: { error: "Ressource introuvable" },
},
});
try {
const res = await fetch("http://localhost/api/promotions/UNKNOWN");
assertEquals(res.status, 404);
@@ -83,7 +88,9 @@ Deno.test("mock API: POST /promotions 400 on missing fields", async () => {
Deno.test("mock API: PUT /promotions/:id updates promotion", async () => {
const updated = { idPromo: "4AFISE25/26", annee: "2026" };
mockFetch({ "/promotions/4AFISE25%2F26": { method: "PUT", status: 200, body: updated } });
mockFetch({
"/promotions/4AFISE25%2F26": { method: "PUT", status: 200, body: updated },
});
try {
const res = await fetch("http://localhost/api/promotions/4AFISE25%2F26", {
method: "PUT",