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