Documentation
¶
Index ¶
- func GetData(e *httpexpect.Response) *httpexpect.Value
- func GetErrors(e *httpexpect.Response) *httpexpect.Value
- func GetObject(obj *httpexpect.Object, path string) *httpexpect.Object
- func Setup(t *testing.T, option SetupOption) (expect *httpexpect.Expect, client *ent.Client, teardown func())
- type SetupOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetData ¶
func GetData(e *httpexpect.Response) *httpexpect.Value
GetData gets data from graphql response.
func GetErrors ¶
func GetErrors(e *httpexpect.Response) *httpexpect.Value
GetErrors return errors from graphql response.
func GetObject ¶
func GetObject(obj *httpexpect.Object, path string) *httpexpect.Object
GetObject return data from path. Path returns a new Value object for child object(s) matching given JSONPath expression. Example 1:
json := `{"users": [{"name": "john"}, {"name": "bob"}]}` value := NewValue(t, json) value.Path("$.users[0].name").String().Equal("john") value.Path("$.users[1].name").String().Equal("bob")
Types ¶
Click to show internal directories.
Click to hide internal directories.