mirror of
https://github.com/hanzoai/msw.git
synced 2026-09-24 17:00:34 +00:00
18 lines
525 B
TypeScript
18 lines
525 B
TypeScript
/**
|
|
* @see https://github.com/mswjs/msw/issues/2129
|
|
*/
|
|
import { test, expect } from '../../playwright.extend'
|
|
|
|
test('handles a stream response without throwing a timeout error', async ({
|
|
loadExample,
|
|
fetch,
|
|
}) => {
|
|
await loadExample(new URL('./2129-worker-use.mocks.ts', import.meta.url))
|
|
|
|
const getResponse = await fetch('/v1/issues')
|
|
expect(await getResponse.text()).toBe('get-body')
|
|
|
|
const postResponse = await fetch('/v1/issues', { method: 'POST' })
|
|
expect(await postResponse.text()).toBe('post-body')
|
|
})
|