Providing an alternative implementation for a service in the Effect library involves creating a l...

How can I provide an alternative implementation of a service created with Effect.Service?
I think this has been asked before, but I searched and couldn't find a reference (the discord search is terrible).
Basically what I get when I try to create a stub is that the provided implementation is missing the _tag property. Should I provide it manually?
This is what I've tried:
    Layer.succeed(
        MyService,
        MyService.of({
            create: (params: {_storeId: string;}) =>
                Effect.sync(() => {
                    return [{ id: "test_log_id" }];
                }),
        }),
    );
Was this page helpful?