Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

client-entry.test.ts

12 lines459 Bytes

1import { expect, it, vi } from 'vitest'
2​
3// A client-only app installs @modelcontextprotocol/client only.
4// If the main entry loads the server SDK, this mock throws.
5vi.mock('@modelcontextprotocol/server', () => {
6 throw new Error('The main entry loaded @modelcontextprotocol/server.')
7})
8​
9it('loads the main entry without the server SDK', async () => {
10 const entry = await import('../src/index')
11 expect(entry.createMCPClient).toBeTypeOf('function')
12})