mirror of
https://github.com/hanzoai/mcp-server-cloudflare.git
synced 2026-10-30 18:28:06 +00:00
25 lines
463 B
TypeScript
25 lines
463 B
TypeScript
import { vi } from 'vitest'
|
|
|
|
import type { Account } from 'cloudflare/resources/accounts/accounts.mjs'
|
|
|
|
/**
|
|
* Creates a mocked implementation of the Cloudflare client
|
|
*/
|
|
export const cloudflareClientMockImplementation = () => {
|
|
return {
|
|
accounts: {
|
|
list: vi.fn(async () => {
|
|
return {
|
|
success: true,
|
|
result: [
|
|
{
|
|
id: 'mock-account-id',
|
|
name: 'mock-account-name',
|
|
},
|
|
] satisfies Account[],
|
|
}
|
|
}),
|
|
},
|
|
}
|
|
}
|