Files
sciagent/fe0/src/components/admin/review/applicationMeritCategoryHint.test.ts
T
Thinh Lam 688fac73e9
CI/CD / backend (push) Failing after 2m8s
CI/CD / frontend (push) Failing after 1m40s
CI/CD / deploy (push) Has been skipped
sciagent code + Gitea Actions CI/CD
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 09:38:30 +07:00

36 lines
1.3 KiB
TypeScript

import { describe, expect, it } from "vitest";
import { getApplicationMeritCategoryHint } from "@/components/admin/review/applicationMeritCategoryHint";
describe("getApplicationMeritCategoryHint", () => {
it("returns trung bình for research + poster-without-review (2.1.4)", () => {
const hint = getApplicationMeritCategoryHint({
initiativeClassification: "research",
researchEvidenceKind: "poster-without-review",
textbookEvidenceKind: "",
});
expect(hint.subgroupCode).toBe("2.1.4");
expect(hint.meritLevel).toBe("trung bình");
expect(hint.detail).toContain("không phản biện");
});
it("returns khá for research + poster (2.1.3)", () => {
const hint = getApplicationMeritCategoryHint({
initiativeClassification: "research",
researchEvidenceKind: "poster",
textbookEvidenceKind: "",
});
expect(hint.subgroupCode).toBe("2.1.3");
expect(hint.meritLevel).toBe("khá");
});
it("returns xuất sắc for textbook + book (sách giáo trình)", () => {
const hint = getApplicationMeritCategoryHint({
initiativeClassification: "textbook",
researchEvidenceKind: "",
textbookEvidenceKind: "book",
});
expect(hint.subgroupCode).toBe("2.2.1");
expect(hint.meritLevel).toBe("xuất sắc");
});
});