MCPcopy Create free account
hub / github.com/effect-app/libs / expectNotLoggedIn

Function expectNotLoggedIn

packages/infra/test/rpc-stream-fullstack.test.ts:265–274  ·  view source on GitHub ↗
(exit: Exit.Exit<unknown, unknown>)

Source from the content-addressed store, hash-verified

263)
264
265const expectNotLoggedIn = (exit: Exit.Exit<unknown, unknown>) => {
266 expect(Exit.isFailure(exit)).toBe(true)
267 if (!Exit.isFailure(exit)) return
268 const failures = (exit.cause as any).reasons as ReadonlyArray<{ _tag: "Fail"; error: any }>
269 expect(failures.length).toBeGreaterThan(0)
270 // The bug surfaces here as a SchemaError ("Expected never | { _tag: 'error', ... }")
271 // because the middleware-thrown NotLoggedInError doesn't match the
272 // wire StreamFailureChunk / CommandFailureWithMetaData wrapping.
273 expect(failures[0]!.error?._tag).toBe("NotLoggedInError")
274}
275
276it.live(
277 "stream resource: middleware-emitted NotLoggedInError surfaces cleanly on the client",

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…