gqltesting

package
v0.0.0-...-f420c12 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2022 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertQuery

func AssertQuery(t *testing.T, engine *graphql.Engine, query string, expected string)

func AssertRequest

func AssertRequest(t *testing.T, engine *graphql.Engine, request graphql.Request, expected string)

func AssertRequestString

func AssertRequestString(t *testing.T, engine *graphql.Engine, req string, expected string)

func RunTest

func RunTest(t *testing.T, test *Test)

RunTest runs a single GraphQL test case.

func RunTests

func RunTests(t *testing.T, tests []*Test)

RunTests runs the given GraphQL test cases as subtests.

Types

type Test

type Test struct {
	Context        context.Context
	Schema         *deprecated.Schema
	Query          string
	OperationName  string
	Variables      map[string]interface{}
	ExpectedResult string
	ExpectedErrors qerrors.ErrorList
}

Test is a GraphQL test case to be used with RunTest(s).

Jump to

Keyboard shortcuts

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