usage-logs.constants.test.ts 503 B

123456789101112131415
  1. import { describe, expect, test } from "vitest";
  2. import {
  3. SESSION_ID_SUGGESTION_LIMIT,
  4. SESSION_ID_SUGGESTION_MAX_LEN,
  5. SESSION_ID_SUGGESTION_MIN_LEN,
  6. } from "@/lib/constants/usage-logs.constants";
  7. describe("Usage logs constants", () => {
  8. test("SESSION_ID_SUGGESTION_* 常量保持稳定(避免前后端阈值漂移)", () => {
  9. expect(SESSION_ID_SUGGESTION_MIN_LEN).toBe(2);
  10. expect(SESSION_ID_SUGGESTION_MAX_LEN).toBe(128);
  11. expect(SESSION_ID_SUGGESTION_LIMIT).toBe(20);
  12. });
  13. });