diff --git a/.env.production b/.env.production index 67893ab1..2d0a583d 100644 --- a/.env.production +++ b/.env.production @@ -1,2 +1,3 @@ VITE_APM_STORE_BASE_URL=https://erotica.spark-app.store VITE_APM_STORE_STATS_BASE_URL=https://feedback.spark-app.store +VITE_SPARK_BACKEND_BASE_URL=https://account.spark-app.store diff --git a/src/__tests__/unit/accountTypes.test.ts b/src/__tests__/unit/accountTypes.test.ts index 09ba85f0..ddc102c0 100644 --- a/src/__tests__/unit/accountTypes.test.ts +++ b/src/__tests__/unit/accountTypes.test.ts @@ -1,3 +1,7 @@ +import { readFileSync } from "node:fs"; +import { dirname, resolve } from "node:path"; +import { fileURLToPath } from "node:url"; + import { describe, expect, it } from "vitest"; import { @@ -14,7 +18,18 @@ import type { SyncedAppListItem, } from "@/global/typedefinition"; +const productionEnv = readFileSync( + resolve(dirname(fileURLToPath(import.meta.url)), "../../../.env.production"), + "utf-8", +); + describe("account shared types", () => { + it("points production account requests at the public account service", () => { + expect(productionEnv).toContain( + "VITE_SPARK_BACKEND_BASE_URL=https://account.spark-app.store", + ); + }); + it("exports backend/forum config and account shapes", () => { const user: SparkUser = { id: 1,