MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / TestString

Function TestString

env/types_test.go:19–27  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

17const testVar = "TEST_ENV_VAR"
18
19func TestString(t *testing.T) {
20 t.Setenv(testVar, "hello world")
21 desc := env.String(testVar)
22
23 var result string
24 require.NoError(t, desc.Parse(&result))
25
26 assert.Equal(t, "hello world", result)
27}
28
29func TestBool(t *testing.T) {
30 tests := []struct {

Callers

nothing calls this directly

Calls 2

StringFunction · 0.92
ParseMethod · 0.80

Tested by

no test coverage detected