MCPcopy
hub / github.com/gofiber/fiber / Test_App_State

Function Test_App_State

app_test.go:3280–3288  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

3278}
3279
3280func Test_App_State(t *testing.T) {
3281 t.Parallel()
3282 app := New()
3283
3284 app.State().Set("key", "value")
3285 str, ok := app.State().GetString("key")
3286 require.True(t, ok)
3287 require.Equal(t, "value", str)
3288}
3289
3290// go test -v -run=^$ -bench=Benchmark_Communication_Flow -benchmem -count=4
3291func Benchmark_Communication_Flow(b *testing.B) {

Callers

nothing calls this directly

Calls 4

NewFunction · 0.70
SetMethod · 0.65
StateMethod · 0.65
GetStringMethod · 0.45

Tested by

no test coverage detected