1import * as AWS from "alchemy/AWS";
2import * as Alchemy from "alchemy";
3import * as Test from "alchemy/Test/Bun";
4import { expect } from "bun:test";
5import * as Effect from "effect/Effect";
6import Stack from "../alchemy.run.ts";
7
8const { test, beforeAll, afterAll, deploy, destroy } = Test.make({
9 providers: AWS.providers(),
10 state: Alchemy.localState(),
11});
12
13const stack = beforeAll(deploy(Stack));
14afterAll.skipIf(!!process.env.NO_DESTROY)(destroy(Stack));
15
16test(
17 "deploys and exposes a url",
18 Effect.gen(function* () {
19 const out = (yield* stack) as unknown;
20 const url = typeof out === "string" ? out : (out as { url: string }).url;
21 expect(url).toBeString();
22 }),
23);