MCPcopy Index your code
hub / github.com/pocketbase/pocketbase / TestFormDataValues

Function TestFormDataValues

plugins/jsvm/form_data_test.go:138–156  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

136}
137
138func TestFormDataValues(t *testing.T) {
139 t.Parallel()
140
141 data := FormData{}
142 data.Append("a", 1)
143 data.Append("b", 2)
144 data.Append("c", 3)
145 data.Append("a", 4)
146
147 values := data.Values()
148
149 expectedKeys := []any{1, 2, 3, 4}
150
151 for _, expected := range expectedKeys {
152 if !list.ExistInSlice(expected, values) {
153 t.Fatalf("Expected key %s to exists in %v", expected, values)
154 }
155 }
156}
157
158func TestFormDataEntries(t *testing.T) {
159 t.Parallel()

Callers

nothing calls this directly

Calls 3

AppendMethod · 0.95
ValuesMethod · 0.95
ExistInSliceFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…