assert

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package assert is a wrapper over testify's assert package. We can expand it with additional functionality with a minimum of code, so long as we don't collide with their definitions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assertions

type Assertions struct {
	// Embedding this to pass through to all functionality we don't add.
	*assert.Assertions
	// contains filtered or unexported fields
}

Assertions adds assertions to testify's assert lib.

func New

func New(tt assert.TestingT) *Assertions

New creates a new Assertions type wrapping testify with additional functions.

func (*Assertions) WantError

func (a *Assertions) WantError(wantErr bool, err error, msgAndArgs ...interface{}) (success bool)

WantError asserts that a function returned an error (i.e. not `nil`).

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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