MCPcopy Index your code
hub / github.com/bootdotdev/bootdev / TestInterpolateVariables

Function TestInterpolateVariables

checks/http_test.go:14–23  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12)
13
14func TestInterpolateVariables(t *testing.T) {
15 got := InterpolateVariables(
16 "${baseURL}/users/${id}?missing=${missing}",
17 map[string]string{"baseURL": "http://localhost:8080", "id": "42"},
18 )
19 want := "http://localhost:8080/users/42?missing=${missing}"
20 if got != want {
21 t.Fatalf("InterpolateVariables() = %q, want %q", got, want)
22 }
23}
24
25func TestInterpolationNames(t *testing.T) {
26 got := InterpolationNames("${baseURL}/users/${id}/${id}")

Callers

nothing calls this directly

Calls 1

InterpolateVariablesFunction · 0.85

Tested by

no test coverage detected