2023-01-27 21:37:20 +00:00
|
|
|
// Copyright (c) Tailscale Inc & AUTHORS
|
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
2022-06-07 19:06:46 +00:00
|
|
|
|
|
|
|
package jsdeps
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
2023-07-21 01:26:52 +00:00
|
|
|
|
|
|
|
"tailscale.com/tstest/deptest"
|
2022-06-07 19:06:46 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestDeps(t *testing.T) {
|
2023-07-21 01:26:52 +00:00
|
|
|
deptest.DepChecker{
|
|
|
|
GOOS: "js",
|
|
|
|
GOARCH: "wasm",
|
|
|
|
BadDeps: map[string]string{
|
2024-05-24 06:13:32 +00:00
|
|
|
"testing": "do not use testing package in production code",
|
2023-07-21 01:26:52 +00:00
|
|
|
"runtime/pprof": "bloat",
|
|
|
|
"golang.org/x/net/http2/h2c": "bloat",
|
|
|
|
"net/http/pprof": "bloat",
|
|
|
|
"golang.org/x/net/proxy": "bloat",
|
|
|
|
"github.com/tailscale/goupnp": "bloat, which can't work anyway in wasm",
|
|
|
|
},
|
|
|
|
}.Check(t)
|
2022-06-07 19:06:46 +00:00
|
|
|
}
|