import { readFileSync } from "node:fs";
import { resolve } from "node:path";
import { describe, expect, it } from "vitest";

const productionEnv = readFileSync(resolve(process.cwd(), ".env.production"), "utf8");

describe("clients production env", () => {
  it("points the API URL to staging while client portal testing is in progress and keeps chat endpoints configured", () => {
    expect(productionEnv).toContain(
      "VITE_API_URL=https://xablo-api-staging-636270553187.europe-west1.run.app"
    );
    expect(productionEnv).toContain("VITE_CHAT_API_URL=https://chat.xtablo.com");
    expect(productionEnv).toContain("VITE_CHAT_WS_URL=wss://chat.xtablo.com");
  });
});
