Documentation
¶
Rendered for js/wasm
Overview ¶
Command wasmtest is the browser-side half of the wasm end-to-end tests. It dials a service through the real wstransport.DialOption (js/wasm implementation) and reports the outcome to the JS host via globalThis.__grpcwsResult. It is driven by ../wasmtest/run.mjs.
globalThis.__grpcwsMode selects what it proves:
echo (default) a bidirectional stream against the echo service;
whoami a bidirectional stream against the Whoami service, whose replies
are prefixed with the identity the server derived from the
WebSocket upgrade request — globalThis.__grpcwsUser is the identity
expected back;
refuse the server refuses the upgrade, so the RPC must fail.
Click to show internal directories.
Click to hide internal directories.