suspect

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

gopher

Suspect

Supabase integration testing toolset

Features

Requirements

You need to have Supabase CLI installed and configured for your project.

Usage

func Test(t *testing.T) {
    suspect.NewSuspect(t).
        Db(func(db *pgx.Conn) {
            // prepare data
        }).
        Api(func(api *httpexpect.Expect) *httpexpect.Expect {
            // call endpoint
            return api
        }).
        Mail(func(mail *client.Client) {
            // check emails
        })
}

See example

Credits

Gopher mascot is based on original artwork by Renee French.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertSignIn added in v0.3.0

func AssertSignIn(credentials UserCredentials) func(api *httpexpect.Expect) *httpexpect.Expect

func AssertSignOut

func AssertSignOut(api *httpexpect.Expect) *httpexpect.Expect

func AssertSignUp

func AssertSignUp(credentials UserCredentials) func(api *httpexpect.Expect) *httpexpect.Expect

func AssertUser

func AssertUser(api *httpexpect.Expect) *httpexpect.Expect

Types

type Suspect

type Suspect struct {
	// contains filtered or unexported fields
}

func NewSuspect

func NewSuspect(t *testing.T) *Suspect

func (*Suspect) Api

func (s *Suspect) Api(a func(*httpexpect.Expect) *httpexpect.Expect) *Suspect

func (*Suspect) Db

func (s *Suspect) Db(a func(conn *pgx.Conn)) *Suspect

func (*Suspect) Mail

func (s *Suspect) Mail(a func(*client.Client)) *Suspect

func (*Suspect) Slice added in v0.4.0

func (s *Suspect) Slice() *Suspect

func (*Suspect) Wait

func (s *Suspect) Wait(seconds int) *Suspect

type UserCredentials

type UserCredentials struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

Jump to

Keyboard shortcuts

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