MCPcopy Create free account
hub / github.com/stretchr/objx / TestConversionJSONWithError

Function TestConversionJSONWithError

conversions_test.go:35–46  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

33}
34
35func TestConversionJSONWithError(t *testing.T) {
36 o := objx.MSI()
37 o["test"] = func() {}
38
39 assert.Panics(t, func() {
40 o.MustJSON()
41 })
42
43 _, err := o.JSON()
44
45 assert.Error(t, err)
46}
47
48func TestConversionBase64(t *testing.T) {
49 o := objx.Map{"name": "Mat"}

Callers

nothing calls this directly

Calls 5

MSIFunction · 0.92
MustJSONMethod · 0.80
JSONMethod · 0.80
PanicsMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…