effect-playwright
    Preparing search index...

    Variable layerConst

    Shares an Effect Layer between Playwright tests in the current worker.

    The layer is acquired before the tests in the block and released after all tests in the block finish. Passing a name wraps the tests in a Playwright describe block. Layers can be nested and reuse their parent services.

    import { Context, Effect, Layer } from "effect";
    import { expect, layer } from "effect-playwright/test";

    class Greeting extends Context.Service<Greeting, string>()("Greeting") {}

    layer(Layer.succeed(Greeting, "hello"))("Greeting", (it) => {
    it.effect("provides the layer", () =>
    Effect.gen(function* () {
    expect(yield* Greeting).toBe("hello");
    }),
    );
    });

    0.6.0