MCPcopy
hub / github.com/mattermost/mattermost / TestToObjects

Function TestToObjects

server/public/plugin/stringifier_test.go:81–94  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

79}
80
81func TestToObjects(t *testing.T) {
82 t.Run("NilShouldReturnNil", func(t *testing.T) {
83 objects := toObjects(nil)
84 assert.Nil(t, objects)
85 })
86 t.Run("EmptyShouldReturnEmpty", func(t *testing.T) {
87 objects := toObjects(make([]string, 0))
88 assert.Empty(t, objects)
89 })
90 t.Run("ShouldReturnSliceOfObjects", func(t *testing.T) {
91 objects := toObjects([]string{"foo", "bar"})
92 assert.Equal(t, []any{"foo", "bar"}, objects)
93 })
94}

Callers

nothing calls this directly

Calls 4

toObjectsFunction · 0.85
RunMethod · 0.65
EmptyMethod · 0.45
EqualMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…