From 2c817fae484b762a62a79737efb4c84a91c87988 Mon Sep 17 00:00:00 2001 From: Tam Nhu Tran Date: Wed, 29 Apr 2026 17:26:51 -0400 Subject: [PATCH] fix(cliproxy): update remaining stale imports in non-colocated tests Fix auth-token-manager, quota-response-cache, stats-fetcher, and proxy-detector import paths in tests/ outside cliproxy. --- tests/unit/api/cliproxy-profile-bridge.test.ts | 2 +- tests/unit/health/cliproxy-port-check.test.ts | 2 +- .../web-server/cliproxy-auth-routes-manual-callback.test.ts | 2 +- tests/unit/web-server/cliproxy-usage-syncer.test.ts | 2 +- tests/unit/web-server/cliproxy-usage-transformer.test.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/unit/api/cliproxy-profile-bridge.test.ts b/tests/unit/api/cliproxy-profile-bridge.test.ts index 07c3be60..0f35ec2b 100644 --- a/tests/unit/api/cliproxy-profile-bridge.test.ts +++ b/tests/unit/api/cliproxy-profile-bridge.test.ts @@ -2,7 +2,7 @@ import { afterEach, beforeEach, describe, expect, it } from 'bun:test'; import * as fs from 'fs'; import * as os from 'os'; import * as path from 'path'; -import { getEffectiveApiKey } from '../../../src/cliproxy/auth-token-manager'; +import { getEffectiveApiKey } from '../../../src/cliproxy/auth/auth-token-manager'; import { resolveCliproxyBridgeMetadata, resolveCliproxyBridgeProfile, diff --git a/tests/unit/health/cliproxy-port-check.test.ts b/tests/unit/health/cliproxy-port-check.test.ts index 3f407ace..396c733b 100644 --- a/tests/unit/health/cliproxy-port-check.test.ts +++ b/tests/unit/health/cliproxy-port-check.test.ts @@ -6,7 +6,7 @@ */ import { describe, it, expect, mock } from 'bun:test'; -import type { ProxyStatus } from '../../../src/cliproxy/proxy-detector'; +import type { ProxyStatus } from '../../../src/cliproxy/proxy/proxy-detector'; // Mutable holder so each test can override the resolved value let mockStatus: ProxyStatus = { running: false, verified: false }; diff --git a/tests/unit/web-server/cliproxy-auth-routes-manual-callback.test.ts b/tests/unit/web-server/cliproxy-auth-routes-manual-callback.test.ts index a583ea28..4a4ee4b8 100644 --- a/tests/unit/web-server/cliproxy-auth-routes-manual-callback.test.ts +++ b/tests/unit/web-server/cliproxy-auth-routes-manual-callback.test.ts @@ -10,7 +10,7 @@ import { clearQuotaCache, getCachedQuota, setCachedQuota, -} from '../../../src/cliproxy/quota-response-cache'; +} from '../../../src/cliproxy/quota/quota-response-cache'; import { restoreFetch, mockFetch } from '../../mocks'; describe('cliproxy-auth-routes manual callback nickname persistence', () => { diff --git a/tests/unit/web-server/cliproxy-usage-syncer.test.ts b/tests/unit/web-server/cliproxy-usage-syncer.test.ts index 54b192ce..db9dffa1 100644 --- a/tests/unit/web-server/cliproxy-usage-syncer.test.ts +++ b/tests/unit/web-server/cliproxy-usage-syncer.test.ts @@ -2,7 +2,7 @@ import { afterEach, beforeEach, describe, expect, it, spyOn } from 'bun:test'; import * as fs from 'fs'; import * as os from 'os'; import * as path from 'path'; -import type { CliproxyUsageApiResponse } from '../../../src/cliproxy/stats-fetcher'; +import type { CliproxyUsageApiResponse } from '../../../src/cliproxy/services/stats-fetcher'; import { runWithScopedConfigDir } from '../../../src/utils/config-manager'; import { loadCachedCliproxyData, diff --git a/tests/unit/web-server/cliproxy-usage-transformer.test.ts b/tests/unit/web-server/cliproxy-usage-transformer.test.ts index 5c937023..4e590aa6 100644 --- a/tests/unit/web-server/cliproxy-usage-transformer.test.ts +++ b/tests/unit/web-server/cliproxy-usage-transformer.test.ts @@ -2,7 +2,7 @@ import * as fs from 'fs'; import * as os from 'os'; import * as path from 'path'; import { afterEach, beforeEach, describe, expect, it } from 'bun:test'; -import type { CliproxyUsageApiResponse } from '../../../src/cliproxy/stats-fetcher'; +import type { CliproxyUsageApiResponse } from '../../../src/cliproxy/services/stats-fetcher'; import { clearModelsDevRegistryCache, setCachedModelsDevRegistry,