You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Route.fulfill only accepts string|Buffer as body type. Add nodejs type ReadableStream to permit streamed calls.
Example
constbodyStream=newReadable();awaitpage.route('**/*',asyncroute=>{route.fulfill({status: 200,contentType: 'application/grpc-web+proto',body: bodyStream});});// @todo interact with pagebodyStream.push(chunk);// @todo assert on DOM statebodyStream.push(chunk);// @todo assert on updated DOM statebodyStream.destroy();// @todo assert request completed
Motivation
There are several use-cases where this is useful:
stubbing grpc-web calls that are server streaming - the test script could push events into the stream and assert the expected in-progress result is displayed in the webview
🚀 Feature Request
Currently,
Route.fulfill
only acceptsstring|Buffer
as body type. Add nodejs typeReadableStream
to permit streamed calls.Example
Motivation
There are several use-cases where this is useful:
The text was updated successfully, but these errors were encountered: