ent: github.com/facebookincubator/ent/entc/integration/ent/enttest Index | Files

package enttest

import "github.com/facebookincubator/ent/entc/integration/ent/enttest"

Index

Package Files

enttest.go

func NewClient Uses

func NewClient(t TestingT, opts ...Option) *ent.Client

NewClient calls ent.NewClient and auto-run migration.

func Open Uses

func Open(t TestingT, driverName, dataSourceName string, opts ...Option) *ent.Client

Open calls ent.Open and auto-run migration.

type Option Uses

type Option func(*options)

Option configures client creation.

func WithMigrateOptions Uses

func WithMigrateOptions(opts ...schema.MigrateOption) Option

WithMigrateOptions forwards options to auto migration.

func WithOptions Uses

func WithOptions(opts ...ent.Option) Option

WithOptions forwards options to client creation.

type TestingT Uses

type TestingT interface {
    FailNow()
    Error(...interface{})
}

TestingT is the interface that is shared between testing.T and testing.B and used by enttest.

Package enttest imports 4 packages (graph). Updated 2020-08-04. Refresh now. Tools for package owners.