t3-code-android-nightly/.repos/alchemy-effect/packages/alchemy/test/Fly/fixtures/actors.ts
Julius Marminge 6f9cea00ae
chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 13:22:30 -07:00

27 lines
762 B
TypeScript

import type { ScratchStack } from "@/Test/Alchemy";
import { scratchStack } from "@/Test/Core";
import { expect } from "alchemy-test";
import * as Effect from "effect/Effect";
import { throughProxy } from "./transport.ts";
/** Fresh engine/provider/state layers address the same durable test.provider rows. */
export const engineActor = (
parent: ScratchStack,
title: string,
file: string,
endpoint?: string,
) =>
Effect.sync(() => {
const actor = scratchStack(
{
providers: throughProxy(() => endpoint),
stage: parent.stage,
},
title,
file,
);
expect(actor.name).toBe(parent.name);
expect(actor.stage).toBe(parent.stage);
expect(actor.state).not.toBe(parent.state);
return actor;
});