cmd/goimports: skip TestCmd on js/wasm

Fixes golang/go#80203

Change-Id: I1e7a0ae20fe2441a3cff44a0128a184cce3a2e99
Reviewed-on: https://go-review.googlesource.com/c/tools/+/796240
Auto-Submit: Madeline Kalil <mkalil@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/cmd/goimports/main_test.go b/cmd/goimports/main_test.go
index 192eb28..9383c2c 100644
--- a/cmd/goimports/main_test.go
+++ b/cmd/goimports/main_test.go
@@ -11,6 +11,7 @@
 	"testing"
 
 	"golang.org/x/tools/internal/modindex"
+	"golang.org/x/tools/internal/testenv"
 	"golang.org/x/tools/txtar"
 )
 
@@ -58,6 +59,7 @@
 // getting modules from the network, and not all
 // the builders have network access.
 func TestCmd(t *testing.T) {
+	testenv.NeedsExec(t)
 	log.SetFlags(log.Lshortfile)
 	dir := t.TempDir()
 	modindex.IndexDir = filepath.Join(modindex.IndexDir, "goimports")