package testhelper

Import Path
	golang.org/x/pkgsite/internal/testing/testhelper (on go.dev)

Dependency Relation
	imports 16 packages, and imported by 4 packages

Involved Source Files Package testhelper provides shared functionality and constants to be used in Discovery tests. It should only be imported by test files.
Package-Level Functions (total 8, in which 5 are exported)
func CompareWithGolden(t *testing.T, got, filename string, update bool)
CreateTestDirectory creates a directory to hold a module when testing local fetching, and returns the directory.
SetupTestClientAndServer returns a *httpClient that can be used to stub requests to remote hosts by redirecting all requests that the client makes to a httptest.Server. with the given handler. It also disables TLS verification.
TestDataPath returns a path corresponding to a path relative to the calling test file. For convenience, rel is assumed to be "/"-delimited. It panics on failure.
ZipContents creates an in-memory zip of the given contents.
Package-Level Constants (total 3, all are exported)
BSD0License is the contents of the BSD-0-Clause license. It is detectable by the licensecheck package, and is considered redistributable.
MITLicense is the contents of the MIT license. It is detectable by the licensecheck package, and is considered redistributable.
UnknownLicense is not detectable by the licensecheck package.