MCPcopy Index your code
hub / github.com/gavv/httpexpect / TestArray_Path

Function TestArray_Path

array_test.go:242–267  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

240}
241
242func TestArray_Path(t *testing.T) {
243 cases := []struct {
244 name string
245 value []interface{}
246 }{
247 {
248 name: "empty",
249 value: []interface{}{},
250 },
251 {
252 name: "not empty",
253 value: []interface{}{"foo", 123.0},
254 },
255 }
256
257 for _, tc := range cases {
258 t.Run(tc.name, func(t *testing.T) {
259 reporter := newMockReporter(t)
260
261 value := NewArray(reporter, tc.value)
262
263 assert.Equal(t, tc.value, value.Path("$").Raw())
264 value.chain.assert(t, success)
265 })
266 }
267}
268
269func TestArray_Schema(t *testing.T) {
270 cases := []struct {

Callers

nothing calls this directly

Calls 6

PathMethod · 0.95
newMockReporterFunction · 0.85
NewArrayFunction · 0.85
assertMethod · 0.80
EqualMethod · 0.45
RawMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…