Skip to content

Commit 07cfc8b

Browse files
committed
test(acp): use the shared auth stubs in the three harnesses that missed them
auth-gate, session-load and session-resume imported AUTHED/UNAUTHED but still hand-rolled `isAuthenticated`, leaving the imports dead. auth-gate was already half-converted (the inline harness uses UNAUTHED), so this finishes what 1456fb2 started and matches the 18 sibling test files.
1 parent 1456fb2 commit 07cfc8b

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/acp-adapter/test/auth-gate.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function makeInMemoryStreamPair(): {
4747

4848
function makeHarnessWithToken(hasToken: boolean): PythinkerHarness {
4949
return {
50-
isAuthenticated: async () => hasToken,
50+
isAuthenticated: hasToken ? AUTHED : UNAUTHED,
5151
} as unknown as PythinkerHarness;
5252
}
5353

packages/acp-adapter/test/session-load.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function makeHarness(
8989
): PythinkerHarness {
9090
const authed = opts.hasUsableToken ?? true;
9191
return {
92-
isAuthenticated: async () => authed,
92+
isAuthenticated: authed ? AUTHED : UNAUTHED,
9393
resumeSession: async (_input: { id: string }) => {
9494
if (opts.resumeError) throw opts.resumeError;
9595
if (!opts.session) throw new Error('test harness has no session configured');

packages/acp-adapter/test/session-resume.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ function makeHarness(opts: {
104104
}): PythinkerHarness {
105105
const authed = opts.hasUsableToken ?? true;
106106
return {
107-
isAuthenticated: async () => authed,
107+
isAuthenticated: authed ? AUTHED : UNAUTHED,
108108
resumeSession: async (_input: { id: string }) => {
109109
if (opts.resumeError) throw opts.resumeError;
110110
if (!opts.session) throw new Error('test harness has no session configured');

0 commit comments

Comments
 (0)