MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / assertJSON

Function assertJSON

query/fastjson_test.go:43–47  ·  view source on GitHub ↗
(t *testing.T, expected string, sg *SubGraph)

Source from the content-addressed store, hash-verified

41}
42
43func assertJSON(t *testing.T, expected string, sg *SubGraph) {
44 buf, err := ToJson(context.Background(), &Latency{}, []*SubGraph{sg}, nil)
45 require.NoError(t, err)
46 require.Equal(t, expected, string(buf))
47}
48
49func TestSubgraphToFastJSON(t *testing.T) {
50 t.Run("With a string result", func(t *testing.T) {

Callers 1

TestSubgraphToFastJSONFunction · 0.85

Calls 1

ToJsonFunction · 0.85

Tested by

no test coverage detected