@@ -2,6 +2,7 @@ import { describe, expect, it } from "@effect/vitest";
22import * as NodeCrypto from "@effect/platform-node/NodeCrypto" ;
33import * as Effect from "effect/Effect" ;
44import * as Layer from "effect/Layer" ;
5+ import * as Option from "effect/Option" ;
56import * as Redacted from "effect/Redacted" ;
67import * as TestClock from "effect/testing/TestClock" ;
78import * as Tracer from "effect/Tracer" ;
@@ -323,11 +324,12 @@ describe("listPullRequestNotifications", () => {
323324 ] ) ,
324325 json ( { message : "Resource not accessible by personal access token" } , { status : 403 } ) ,
325326 ] ;
327+ let appSignedIn = true ;
326328 const { layer, requests } = harness (
327329 ( ) => answers . shift ( ) ! ,
328330 Layer . mock ( GitHubAppSignIn . GitHubAppSignIn ) ( {
329331 enabled : true ,
330- token : ( ) => Effect . succeedSome ( "app" ) ,
332+ token : ( ) => Effect . sync ( ( ) => ( appSignedIn ? Option . some ( "app" ) : Option . none ( ) ) ) ,
331333 invalidate : ( ) => Effect . void ,
332334 } ) ,
333335 ) ;
@@ -336,6 +338,9 @@ describe("listPullRequestNotifications", () => {
336338 const list = makeListPullRequestNotifications ( yield * GitHubRest . GitHubRest ) ;
337339 const since = Date . parse ( "2026-10-05T11:55:00.400Z" ) ;
338340 const input = { host : "github.com" , repository : "acme/web" , since } ;
341+ expect ( yield * list ( input ) ) . toBeNull ( ) ;
342+ expect ( requests ) . toEqual ( [ ] ) ;
343+ appSignedIn = false ;
339344 expect ( yield * list ( input ) ) . toEqual ( { threads : [ ] , truncated : false } ) ;
340345 expect ( yield * list ( input ) ) . toEqual ( {
341346 threads : [ { number : 7 , updatedAt : Date . parse ( "2026-10-05T11:58:03Z" ) } ] ,
0 commit comments