test: add vitest baseline for critical payment and auth guards

This commit is contained in:
2026-04-03 18:15:18 +02:00
parent 2542748e82
commit 68416ed9de
12 changed files with 730 additions and 75 deletions

9
convex/ai-utils.ts Normal file
View File

@@ -0,0 +1,9 @@
type NodeCanvasRef = {
canvasId: string;
};
export function assertNodeBelongsToCanvasOrThrow(node: NodeCanvasRef, canvasId: string): void {
if (node.canvasId !== canvasId) {
throw new Error("Node does not belong to canvas");
}
}