const testServices = pipe(
Layer.mergeAll(...)
Layer.tapErrorCause((error) => Effect.logError('LAYER ERROR', error)),
) satisfies Layer.Layer<any, any, never>;
const manageRuntime = ManagedRuntime.make(testServices);
afterAll(() => manageRuntime.dispose());
const test = <
A,
E,
Eff extends Effect.Effect<A, E, Layer.Layer.Success<typeof testServices>>,
>(
effect: Eff,
) =>
pipe(
effect,
Effect.tapErrorCause((error) => Effect.logError('TEST ERROR', error)),
manageRuntime.runPromise,
);
describe.concurrent('tests', () => {
it('foo', () =>
test(
Effect.gen(function* () {...}),
));
it('bar', () =>
test(
Effect.gen(function* () {...}),
));
})
const testServices = pipe(
Layer.mergeAll(...)
Layer.tapErrorCause((error) => Effect.logError('LAYER ERROR', error)),
) satisfies Layer.Layer<any, any, never>;
const manageRuntime = ManagedRuntime.make(testServices);
afterAll(() => manageRuntime.dispose());
const test = <
A,
E,
Eff extends Effect.Effect<A, E, Layer.Layer.Success<typeof testServices>>,
>(
effect: Eff,
) =>
pipe(
effect,
Effect.tapErrorCause((error) => Effect.logError('TEST ERROR', error)),
manageRuntime.runPromise,
);
describe.concurrent('tests', () => {
it('foo', () =>
test(
Effect.gen(function* () {...}),
));
it('bar', () =>
test(
Effect.gen(function* () {...}),
));
})