test(core): fix layer node type expectation

This commit is contained in:
Aiden Cline 2026-06-28 23:36:10 -05:00
commit a2fc3057e7

View file

@ -69,9 +69,12 @@ void invalidNodeReplacement
// @ts-expect-error Replacement cannot introduce a new error
LayerNode.compile(a, [[a, Layer.effect(A, Effect.fail(new OtherError()))]])
// @ts-expect-error Node replacement cannot introduce a new error
const invalidNodeErrorReplacement = () =>
LayerNode.compile(a, [[a, make({ service: A, layer: Layer.effect(A, Effect.fail(new OtherError())), deps: [] })]])
const invalidNodeErrorReplacement = () => {
return LayerNode.compile(a, [
// @ts-expect-error Node replacement cannot introduce a new error
[a, make({ service: A, layer: Layer.effect(A, Effect.fail(new OtherError())), deps: [] })],
])
}
void invalidNodeErrorReplacement
class TagA extends Context.Service<TagA, {}>()("test/TagA") {}