The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import { providers } from "@alchemy.run/neon/Providers"; |
| 2 | import { expect } from "@alchemy.run/test"; |
| 3 | import * as Test from "@alchemy.run/test/Alchemy"; |
| 4 | import { Server } from "alchemy/Website/Server"; |
| 5 | import * as Effect from "effect/Effect"; |
| 6 | import { browserRoundtrip } from "./Browser.ts"; |
| 7 | import { bodyContaining, exampleRoot } from "./Fixture.ts"; |
| 8 | |
| 9 | const { test } = Test.make({ providers: providers(), dev: true }); |
| 10 | |
| 11 | test.provider( |
| 12 | "Vocs source target isolates its dev cwd and supports interactive MDX", |
| 13 | (stack) => |
| 14 | Effect.gen(function* () { |
| 15 | yield* stack.destroy(); |
| 16 | const root = yield* exampleRoot("vocs"); |
| 17 | const framework = new URL( |
| 18 | "../../../../../packages/frontend-frameworks/src/vocs/neon.ts", |
| 19 | import.meta.url, |
| 20 | ).href; |
| 21 | const server = yield* stack.deploy(Server("Build", { root, framework, target: framework })); |
| 22 | expect(server.url).toMatch(/^http:\/\/(localhost|127\.0\.0\.1):\d+/); |
| 23 | yield* bodyContaining(`${server.url}/counter`, "count:"); |
| 24 | yield* browserRoundtrip(String(server.url), "vocs"); |
| 25 | yield* stack.destroy(); |
| 26 | }), |
| 27 | { |
| 28 | tags: ["provider:neon", "provider:neon:website", "local"], |
| 29 | timeout: 120_000, |
| 30 | }, |
| 31 | ); |