Skip to content

Commit 5e86028

Browse files
committed
fix(test): make publish smoke test typecheck
1 parent 4867d33 commit 5e86028

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/clawdhub/src/cli/commands/publish.test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ vi.mock('../../config.js', () => ({
1111
readGlobalConfig: vi.fn(async () => ({ registry: 'https://clawdhub.com', token: 'tkn' })),
1212
}))
1313

14-
const mockGetRegistry = vi.fn(async () => 'https://clawdhub.com')
14+
const mockGetRegistry = vi.fn(async (_opts: unknown, _params?: unknown) => 'https://clawdhub.com')
1515
vi.mock('../registry.js', () => ({
16-
getRegistry: (...args: unknown[]) => mockGetRegistry(...args),
16+
getRegistry: (opts: unknown, params?: unknown) => mockGetRegistry(opts, params),
1717
}))
1818

1919
const mockApiRequest = vi.fn()
2020
vi.mock('../../http.js', () => ({
21-
apiRequest: (...args: unknown[]) => mockApiRequest(...args),
21+
apiRequest: (registry: unknown, args: unknown, schema?: unknown) =>
22+
mockApiRequest(registry, args, schema),
2223
}))
2324

2425
const mockFail = vi.fn((message: string) => {
@@ -27,7 +28,7 @@ const mockFail = vi.fn((message: string) => {
2728
const mockSpinner = { text: '', succeed: vi.fn(), fail: vi.fn() }
2829
vi.mock('../ui.js', () => ({
2930
createSpinner: vi.fn(() => mockSpinner),
30-
fail: (...args: unknown[]) => mockFail(...args),
31+
fail: (message: string) => mockFail(message),
3132
formatError: (error: unknown) => (error instanceof Error ? error.message : String(error)),
3233
}))
3334

0 commit comments

Comments
 (0)