test

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package test helpers for writing/running unit tests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrStr

func ErrStr(err error) string

ErrStr returns a string representation of the error, or empty if the error doesn't exist

func LoadFixture

func LoadFixture(t *testing.T, filename string) []byte

LoadFixture from testdata directory as []byte

func LoadFixtureJSON

func LoadFixtureJSON(t *testing.T, filename string, data any)

LoadFixtureJSON from testdata directory and unmarshal the JSON into the given interface

func LoadFixtureReader

func LoadFixtureReader(t *testing.T, filename string) io.ReadCloser

LoadFixtureReader from testdata directory as io.ReadCloser

Types

This section is empty.

Jump to

Keyboard shortcuts

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