# install `wasmexec`.
go install github.com/linden/wasmexec@latest
# set the build target to wasm/js then run using wasmexec as the executor.
GOOS=js GOARCH=wasm go run -exec wasmexec
# set the build target to wasm/js then test using wasmexec as the executor.
GOOS=js GOARCH=wasm go test -exec wasmexec -v
Based-off of github.com/agnivade/wasmbrowsertest
.