Download cloud-v2/scripts/deploy-pages.test.ts from Anirudh1950/MentraOS: direct link, hf CLI and curl.
- Browser
- Download file 1.9 kB
-
https://huggingface.co/Anirudh1950/MentraOS/resolve/main/cloud-v2/scripts/deploy-pages.test.ts
- Command line
-
hf download hf://Anirudh1950/MentraOS/cloud-v2/scripts/deploy-pages.test.ts
-
curl -L -o deploy-pages.test.ts https://huggingface.co/Anirudh1950/MentraOS/resolve/main/cloud-v2/scripts/deploy-pages.test.ts
1.9 kB
| import { expect, test } from "bun:test"; | |
| import { developerConsoleUrl } from "../websites/portal/src/lib/config"; | |
| import { workspacePortalUrl } from "../websites/admin/src/lib/config"; | |
| import { adminBuildConfig, developerConsoleUrls, portalBuildConfig, portalUrls } from "./deploy-pages"; | |
| test("each environment's workspace portal links to its own Developer Console", () => { | |
| expect(developerConsoleUrls).toEqual({ | |
| dev: "https://console.dev.mentraglass.com", | |
| staging: "https://console.staging.mentraglass.com", | |
| prod: "https://console.mentraglass.com", | |
| }); | |
| }); | |
| test("portal builds link to services in their own environment", () => { | |
| expect(portalUrls).toEqual({ | |
| dev: "https://portal.dev.mentraglass.com", | |
| staging: "https://portal.staging.mentraglass.com", | |
| prod: "https://portal.mentraglass.com", | |
| }); | |
| for (const env of ["dev", "staging", "prod"] as const) { | |
| const config = portalBuildConfig(env); | |
| expect(config).toEqual({ DEVELOPER_CONSOLE_URL: developerConsoleUrls[env] }); | |
| expect(developerConsoleUrl(config.DEVELOPER_CONSOLE_URL)).toBe(developerConsoleUrls[env]); | |
| const adminConfig = adminBuildConfig(env); | |
| expect(adminConfig).toEqual({ PORTAL_URL: portalUrls[env] }); | |
| expect(workspacePortalUrl(adminConfig.PORTAL_URL)).toBe(portalUrls[env]); | |
| } | |
| }); | |
| test("each environment's admin portal links to its own workspace portal, in a form the admin portal accepts", () => { | |
| expect(portalUrls).toEqual({ | |
| dev: "https://portal.dev.mentraglass.com", | |
| staging: "https://portal.staging.mentraglass.com", | |
| prod: "https://portal.mentraglass.com", | |
| }); | |
| for (const env of ["dev", "staging", "prod"] as const) { | |
| const config = adminBuildConfig(env); | |
| expect(config).toEqual({ PORTAL_URL: portalUrls[env] }); | |
| expect(workspacePortalUrl(config.PORTAL_URL)).toBe(portalUrls[env]); | |
| } | |
| }); | |