offPeakHistoryStatus.test.ts 440 B

12345678910111213
  1. import { describe, expect, it } from "vitest";
  2. import { resolveOffPeakHistoryStatus } from "@/settings/OffPeakHistoryTab.js";
  3. describe("idle-time task history status", () => {
  4. it.each([
  5. ["completed", "succeeded"],
  6. ["failed", "failed"],
  7. ["cancelled", "skipped"],
  8. ["running", "running"],
  9. ] as const)("%s 映射为 %s", (status, expected) => {
  10. expect(resolveOffPeakHistoryStatus({ status })).toBe(expected);
  11. });
  12. });