fix(gateway): align node push token typing and router test mock

This commit is contained in:
William Valentin
2026-02-17 16:06:03 -08:00
parent 803de57261
commit 59199731c3
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -43,6 +43,12 @@ const mockModelClient = {
stopReason: 'end_turn', stopReason: 'end_turn',
usage: { inputTokens: 10, outputTokens: 5 }, usage: { inputTokens: 10, outputTokens: 5 },
})), })),
setTier: vi.fn(() => true),
getTier: vi.fn(() => 'default' as const),
getLabel: vi.fn((tier: string) => tier),
setTierStrict: vi.fn(),
addTierChangeListener: vi.fn(),
removeTierChangeListener: vi.fn(),
}; };
const mockToolRegistry = { const mockToolRegistry = {
+1 -1
View File
@@ -431,7 +431,7 @@ export class GatewayServer {
return; return;
} }
const provider = pushToken.provider === 'fcm' ? 'fcm' : 'apns'; const provider = pushToken.provider === 'fcm' ? 'fcm' : 'apns';
const normalizedPushToken = { const normalizedPushToken: NonNullable<NodeConnectionState['pushToken']> = {
provider, provider,
token: pushToken.token, token: pushToken.token,
topic: pushToken.topic, topic: pushToken.topic,