feat(ci): ajouter validation et garde-fou de déploiement
This commit is contained in:
@@ -1,4 +1,18 @@
|
||||
import { describe, expect, it, vi, beforeEach } from "vitest";
|
||||
|
||||
// Les tests de contrat tRPC ne doivent jamais dépendre d'une base ou d'une migration
|
||||
// disponible dans l'environnement CI. Les quatre lectures publiques sont donc isolées.
|
||||
vi.mock("./db", async () => {
|
||||
const actual = await vi.importActual<typeof import("./db")>("./db");
|
||||
return {
|
||||
...actual,
|
||||
getVeilleItems: vi.fn(async () => ({ items: [], total: 0 })),
|
||||
getVeilleDistinctValues: vi.fn(async () => ({ categories: [], niveaux: [], territoires: [] })),
|
||||
getAapItems: vi.fn(async () => ({ items: [], total: 0 })),
|
||||
getAapDistinctValues: vi.fn(async () => ({ regions: [], departements: [] })),
|
||||
};
|
||||
});
|
||||
|
||||
import { appRouter } from "./routers";
|
||||
import type { TrpcContext } from "./_core/context";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user