mirror of
https://github.com/hanzoai/msw.git
synced 2026-09-24 17:00:34 +00:00
13 lines
419 B
TypeScript
13 lines
419 B
TypeScript
import { test, expect } from '../../../playwright.extend'
|
|
|
|
test('responds with a text response body', async ({ loadExample, fetch }) => {
|
|
await loadExample(new URL('./body-text.mocks.ts', import.meta.url))
|
|
|
|
const res = await fetch('/text')
|
|
const headers = await res.allHeaders()
|
|
const text = await res.text()
|
|
|
|
expect(headers).toHaveProperty('content-type', 'text/plain')
|
|
expect(text).toBe('hello world')
|
|
})
|