e2e

package
v0.0.0-...-abb50dc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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")

func Setup

func Setup(t *testing.T, option SetupOption) (expect *httpexpect.Expect, client *ent.Client, teardown func())

Setup set up database and server for E2E test

Types

type SetupOption

type SetupOption struct {
	Teardown func(t *testing.T, client *ent.Client)
}

SetupOption is an option of SetupE2E

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL