t3-code-android-nightly/.repos/alchemy-effect/examples/aws-lambda/test/integ.test.ts
Julius Marminge bd851c0203
chore: add Alchemy reference repo subtree (#2918)
Co-authored-by: codex <codex@users.noreply.github.com>
2026-06-03 00:08:31 +00:00

23 lines
688 B
TypeScript

import * as AWS from "alchemy/AWS";
import * as Alchemy from "alchemy";
import * as Test from "alchemy/Test/Bun";
import { expect } from "bun:test";
import * as Effect from "effect/Effect";
import Stack from "../alchemy.run.ts";
const { test, beforeAll, afterAll, deploy, destroy } = Test.make({
providers: AWS.providers(),
state: Alchemy.localState(),
});
const stack = beforeAll(deploy(Stack));
afterAll.skipIf(!!process.env.NO_DESTROY)(destroy(Stack));
test(
"deploys and exposes a url",
Effect.gen(function* () {
const out = (yield* stack) as unknown;
const url = typeof out === "string" ? out : (out as { url: string }).url;
expect(url).toBeString();
}),
);