Run WASM tests inside your browser
cleanenv
which can be used to strip certain environment variables prior to running the tool. This can be useful because certain CI environments add an exceedingly large amount of env vars which is then limited by the Go runtime.Update dependencies
For example, if your code expects a flag -species
, you can just run GOOS=js GOARCH=wasm go run -exec=wasmbrowsertest file.go -species=human
and your flag will be passed correctly to your program.