/** @effect-diagnostics anyUnknownInErrorContext:off */ import bun from "bun:test"; import * as Effect from "effect/Effect"; import type { HookOptions } from "node:test"; import type { AlchemyContext } from "../AlchemyContext.ts"; import type { CompiledStack } from "../Stack.ts"; import type { Stage } from "../Stage.ts"; import * as Core from "./Core.ts"; export { executeWhenReady, getWhenReady, guardContentType, guardedFetchLayer, rpcClientLayer, WorkerNotReady, type EdgeGuardOptions, type WhenReadyOptions, } from "./Http.ts"; export type MakeOptions = Core.MakeOptions; export type ScratchStack = Core.ScratchStack; export type TestEffect = Core.TestEffect; export interface TestApi { test: TestFn; beforeAll: BeforeAllFn; beforeEach: BeforeEachFn; afterAll: AfterAllFn; afterEach: AfterEachFn; deploy: (stack: TestEffect, Stage | AlchemyContext>, options?: { stage?: string; }) => ReturnType>; destroy: (stack: TestEffect, options?: { stage?: string; }) => ReturnType; } interface TestFn { (name: string, eff: TestEffect, options?: bun.TestOptions): void; skip: (name: string, eff: TestEffect, options?: bun.TestOptions) => void; skipIf: (condition: boolean) => (name: string, eff: TestEffect, options?: bun.TestOptions) => void; only: (name: string, eff: TestEffect, options?: bun.TestOptions) => void; todo: (name: string, eff: TestEffect, options?: bun.TestOptions) => void; provider: ProviderFn; } interface ProviderFn { (name: string, fn: (stack: ScratchStack) => Effect.Effect, options?: bun.TestOptions): void; skip: (name: string, fn: (stack: ScratchStack) => Effect.Effect, options?: bun.TestOptions) => void; skipIf: (condition: boolean) => (name: string, fn: (stack: ScratchStack) => Effect.Effect, options?: bun.TestOptions) => void; } interface BeforeAllFn { (eff: TestEffect, options?: HookOptions): Effect.Effect; } interface BeforeEachFn { (eff: TestEffect, options?: HookOptions): void; } interface AfterAllFn { (eff: TestEffect, options?: HookOptions): void; skipIf: (predicate: boolean) => (eff: TestEffect, options?: HookOptions) => void; } interface AfterEachFn { (eff: TestEffect, options?: HookOptions): void; } /** * Build the per-file test API. Configure providers / state once at the top of * the test file: * * ```ts * import * as Test from "alchemy/Test/Bun"; * import * as Cloudflare from "alchemy/Cloudflare"; * * const { test, deploy, destroy, beforeAll, afterAll } = Test.make({ * providers: Cloudflare.providers(), * state: Cloudflare.state(), * }); * ``` */ export declare const make: (options: MakeOptions) => TestApi; //# sourceMappingURL=Bun.d.ts.map