Spaces:
Paused
Paused
Download apps/web/tests/presenterContext.test.ts from nathycodes/presentercoach: direct link, hf CLI and curl.
- Browser
- Download file 998 Bytes
-
https://huggingface.co/spaces/nathycodes/presentercoach/resolve/main/apps/web/tests/presenterContext.test.ts
- Command line
-
hf download hf://spaces/nathycodes/presentercoach/apps/web/tests/presenterContext.test.ts
-
curl -L -o presenterContext.test.ts https://huggingface.co/spaces/nathycodes/presentercoach/resolve/main/apps/web/tests/presenterContext.test.ts
998 Bytes
| import { beforeEach, describe, expect, it } from "vitest"; | |
| import { consumeStudioLaunchContext, saveStudioLaunchContext } from "@/lib/presenter"; | |
| describe("studio launch context handoff", () => { | |
| beforeEach(() => { | |
| window.sessionStorage.clear(); | |
| }); | |
| it("saves and consumes curriculum/teleprompter studio launch context once", () => { | |
| saveStudioLaunchContext({ | |
| title: "Day 1: Baseline Tech Self-Intro", | |
| mode: "Pitch", | |
| curriculumDay: 1, | |
| teleprompterScript: "Hi, I build reliable cloud tools.", | |
| bulletCues: ["Hook", "Problem", "Impact"], | |
| targetKeywords: ["reliable", "cloud"], | |
| teleprompterMode: "scroll", | |
| targetSeconds: 60, | |
| }); | |
| const firstRead = consumeStudioLaunchContext(); | |
| expect(firstRead?.curriculumDay).toBe(1); | |
| expect(firstRead?.teleprompterMode).toBe("scroll"); | |
| expect(firstRead?.bulletCues).toHaveLength(3); | |
| const secondRead = consumeStudioLaunchContext(); | |
| expect(secondRead).toBeNull(); | |
| }); | |
| }); | |