Skip to content

Commit 6fb95f3

Browse files
committed
fix: align survey kfc tests with CUSTOM_API managed URL
isManagedPythinkerCodeBaseUrl only matches CUSTOM_API_BASE_URL. Point survey kfc fixtures at that env so pfc_model_id and pfc_trace_id resolve. Annotate the shared session-event host helper return type for tsc.
1 parent 94dabdd commit 6fb95f3

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

‎apps/pythinker-code/test/tui/controllers/session-event-handler-host.ts‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ type HostOverrides = {
1010
[key: string]: unknown;
1111
};
1212

13-
export function makeSessionEventHandlerHost(overrides: HostOverrides = {}) {
13+
export function makeSessionEventHandlerHost(overrides: HostOverrides = {}): {
14+
readonly host: never;
15+
readonly streamingUI: never;
16+
readonly surveyController: never;
17+
} {
1418
const streamingUI = {
1519
setTurnId: vi.fn(),
1620
flushNow: vi.fn(),
@@ -89,5 +93,5 @@ export function makeSessionEventHandlerHost(overrides: HostOverrides = {}) {
8993
...rest,
9094
};
9195

92-
return { host: host as never, streamingUI, surveyController };
96+
return { host: host as never, streamingUI: streamingUI as never, surveyController: surveyController as never };
9397
}

‎apps/pythinker-code/test/tui/controllers/survey-controller.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ describe('SurveyController kfc model gate', () => {
763763
const savedBaseUrl = process.env['CUSTOM_API_BASE_URL'];
764764

765765
beforeEach(() => {
766-
delete process.env['CUSTOM_API_BASE_URL'];
766+
process.env['CUSTOM_API_BASE_URL'] = MANAGED_BASE_URL;
767767
});
768768

769769
afterEach(() => {
@@ -2167,7 +2167,7 @@ describe('SurveyController appearance snapshot', () => {
21672167
const savedBaseUrl = process.env['CUSTOM_API_BASE_URL'];
21682168

21692169
beforeEach(() => {
2170-
delete process.env['CUSTOM_API_BASE_URL'];
2170+
process.env['CUSTOM_API_BASE_URL'] = MANAGED_BASE_URL;
21712171
});
21722172

21732173
afterEach(() => {

0 commit comments

Comments
 (0)