chore: formated tests
Check Deno code / Check Deno code (pull_request) Successful in 5s
Tests / Unit tests (pull_request) Successful in 12s
Tests / Integration tests (pull_request) Successful in 1m9s
Check Deno code / Check Deno code (push) Successful in 6s
Tests / Unit tests (push) Successful in 12s
Tests / Integration tests (push) Successful in 1m13s
Check Deno code / Check Deno code (pull_request) Successful in 5s
Tests / Unit tests (pull_request) Successful in 12s
Tests / Integration tests (pull_request) Successful in 1m9s
Check Deno code / Check Deno code (push) Successful in 6s
Tests / Unit tests (push) Successful in 12s
Tests / Integration tests (push) Successful in 1m13s
This commit was merged in pull request #145.
This commit is contained in:
@@ -42,7 +42,9 @@ Deno.test("mock API: GET /ues/:id returns one UE", async () => {
|
||||
});
|
||||
|
||||
Deno.test("mock API: GET /ues/:id 404 when not found", async () => {
|
||||
mockFetch({ "/ues/99": { status: 404, body: { error: "Ressource introuvable" } } });
|
||||
mockFetch({
|
||||
"/ues/99": { status: 404, body: { error: "Ressource introuvable" } },
|
||||
});
|
||||
try {
|
||||
const res = await fetch("http://localhost/api/ues/99");
|
||||
assertEquals(res.status, 404);
|
||||
@@ -125,7 +127,9 @@ Deno.test("mock API: DELETE /ues/:id returns 204", async () => {
|
||||
Deno.test("mock API: DELETE /ues/:id 404 when not found", async () => {
|
||||
mockFetch({ "/ues/99": { method: "DELETE", status: 404 } });
|
||||
try {
|
||||
const res = await fetch("http://localhost/api/ues/99", { method: "DELETE" });
|
||||
const res = await fetch("http://localhost/api/ues/99", {
|
||||
method: "DELETE",
|
||||
});
|
||||
assertEquals(res.status, 404);
|
||||
} finally {
|
||||
restoreFetch();
|
||||
|
||||
Reference in New Issue
Block a user