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

fixture-api.spec.ts

11 lines372 Bytes

1import { expect, test } from '@playwright/test'
2​
3test('server API receives canned users without a fixture listener', async ({
4 request,
5}) => {
6 const response = await request.get('/api/users')
7 expect(response.ok()).toBe(true)
8 const users = await response.json()
9 expect(users).toHaveLength(10)
10 expect(users[0]).toMatchObject({ id: 1, name: 'Leanne Graham' })
11})