Back to

Package enttest

Latest Go to latest

The latest major version is .

Published: Aug 4, 2020 | License: Apache-2.0 | Module:


func NewClient

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

NewClient calls ent.NewClient and auto-run migration.

func Open

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

Open calls ent.Open and auto-run migration.

type Option

type Option func(*options)

Option configures client creation.

func WithMigrateOptions

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

WithMigrateOptions forwards options to auto migration.

func WithOptions

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

WithOptions forwards options to client creation.

type TestingT

type TestingT interface {

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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier