Download frontend/src/lib/billing-plans.test.ts from new-arc/vector: direct link, hf CLI and curl.
- Browser
- Download file 581 Bytes
-
https://huggingface.co/spaces/new-arc/vector/resolve/main/frontend/src/lib/billing-plans.test.ts
- Command line
-
hf download hf://spaces/new-arc/vector/frontend/src/lib/billing-plans.test.ts
-
curl -L -o billing-plans.test.ts https://huggingface.co/spaces/new-arc/vector/resolve/main/frontend/src/lib/billing-plans.test.ts
581 Bytes
| import { socialPublishingStage } from "./billing-plans"; | |
| describe("socialPublishingStage", () => { | |
| const env = process.env; | |
| afterEach(() => { | |
| process.env = env; | |
| }); | |
| it.each([ | |
| [undefined, "soon"], | |
| ["", "soon"], | |
| ["soon", "soon"], | |
| ["off", "off"], | |
| ["0", "off"], | |
| ["live", "live"], | |
| ["1", "live"], | |
| ])("maps %j to %s", (value, stage) => { | |
| process.env = { ...env, NEXT_PUBLIC_SOCIAL_PUBLISHING: value }; | |
| if (value === undefined) delete process.env.NEXT_PUBLIC_SOCIAL_PUBLISHING; | |
| expect(socialPublishingStage()).toBe(stage); | |
| }); | |
| }); | |