(exit: Exit.Exit<unknown, unknown>)
| 263 | ) |
| 264 | |
| 265 | const 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 | |
| 276 | it.live( |
| 277 | "stream resource: middleware-emitted NotLoggedInError surfaces cleanly on the client", |
no outgoing calls
no test coverage detected
searching dependent graphs…