Open History to see the last commit
1import { test, expect } from './fixtures'
2
3test('fakeText from @tanstack/ai/testing runs a tool loop with no network', async ({
4 request,
5}) => {
6 const response = await request.post('/api/fake-text')
7
8 expect(response.ok()).toBe(true)
9 await expect(response.json()).resolves.toEqual({
10 text: 'Tool said: sunny in Oslo',
11 callCount: 2,
12 pending: 0,
13 })
14})