gopls/internal/server: disable TestCheckGoModDeps for js
- test relies on os.Executable() which isn't implemented in js.
For golang/go#76895
diff --git a/gopls/internal/server/vulncheck_prompt_test.go b/gopls/internal/server/vulncheck_prompt_test.go
index 0085438..89a2acc 100644
--- a/gopls/internal/server/vulncheck_prompt_test.go
+++ b/gopls/internal/server/vulncheck_prompt_test.go
@@ -111,6 +111,9 @@
}
func TestCheckGoModDeps(t *testing.T) {
+ if runtime.GOOS == "js" {
+ t.Skip("test does not work in a js environment")
+ }
const (
yes = "Yes"
no = "No"
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if runtime.GOOS == "js" || runtime.GOARCH == "wasm" {Consider @hxj...@golang.org's [suggestion](https://go.dev/issue/76894#issuecomment-3672203117) of using `testenv.NeedsExec(t)`: it will handle additional test environments where execute permission is absent, it's shorter, it consolidates maintenance to that one function, and it's consistent with other tests.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
if runtime.GOOS == "js" || runtime.GOARCH == "wasm" {Consider @hxj...@golang.org's [suggestion](https://go.dev/issue/76894#issuecomment-3672203117) of using `testenv.NeedsExec(t)`: it will handle additional test environments where execute permission is absent, it's shorter, it consolidates maintenance to that one function, and it's consistent with other tests.
Sounds good, I feel like that testenv.NeedsExec(t) doesn't really make that clear in the documentation.
But I agree with the part that this test should use the consolidated test utilities available to us.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
gopls/internal/server: disable TestCheckGoModDeps for js and wasm
- test relies on os.Executable() which isn't implemented in js and wasm.
For golang/go#76895
Fixes golang/go#76894
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |