providerM2LegacyBoundary.test.ts 739 B

12345678910111213141516171819
  1. import { access } from "node:fs/promises";
  2. import { fileURLToPath } from "node:url";
  3. import { describe, expect, it } from "vitest";
  4. const retiredProviderSources = [
  5. "../src/model-provider/codingPlanCache.ts",
  6. "../src/model-provider/repo/atomicFileRepo.ts",
  7. "../src/model-provider/repo/glmWorkspaceConfigRepo.ts",
  8. "../src/providers/codexModelOverride.ts",
  9. "../src/providers/providerSettingsJson.ts",
  10. ] as const;
  11. describe("M2 Provider legacy boundary", () => {
  12. it.each(retiredProviderSources)("不再保留已退出的旧事实源 %s", async (relativePath) => {
  13. const filePath = fileURLToPath(new URL(relativePath, import.meta.url));
  14. await expect(access(filePath)).rejects.toMatchObject({ code: "ENOENT" });
  15. });
  16. });