Initial import NDC_1C

This commit is contained in:
2026-03-26 10:38:25 +03:00
commit a162d77ef7
2943 changed files with 3615871 additions and 0 deletions
@@ -0,0 +1,28 @@
import request from "supertest";
import { describe, expect, it } from "vitest";
import { createApp } from "../src/server";
describe("POST /api/eval/run", () => {
it("runs v2 eval using inline rawQuestions batch", async () => {
const app = createApp();
const response = await request(app).post("/api/eval/run").send({
normalizeConfig: {
promptVersion: "normalizer_v2_0_2",
useMock: true
},
useMock: true,
mode: "single-pass-strict",
rawQuestions:
"Проверь хвосты по поставщикам и разложи цепочку; Как вообще по ФСБУ; Покажи топ рисков за июнь 2020"
});
expect(response.status).toBe(200);
expect(response.body.ok).toBe(true);
expect(response.body.report?.schema_version).toBe("v2_0_2");
expect(response.body.report?.cases_total).toBe(3);
expect(typeof response.body.report?.metrics?.schema_validation_pass_rate).toBe("number");
expect(response.body.report?.metrics?.route_resolution_accuracy).not.toBeUndefined();
expect(response.body.report?.metrics?.execution_state_consistency_rate).not.toBeUndefined();
expect(Array.isArray(response.body.report?.results)).toBe(true);
});
});