Supabase integration testing toolset
- Run tests against local dev environment
- Access the API, database and email communication using preconfigured instances of
You need to have Supabase CLI installed and configured for your project.
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
Gopher mascot is based on original artwork by Renee French.