xassert

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package xassert implements additional common test helpers on top of testify assert.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EqualAll

func EqualAll[T any](t assert.TestingT, expected T, actuals []T) bool

EqualAll asserts that all elements are equal to the expected value.

func EqualAllFunc

func EqualAllFunc[T, K any](t assert.TestingT, expected K, actuals []T, f func(elem T) K) bool

EqualAllFunc asserts that all elements are equal to the expected value after applying the given function to each element.

func MockContextArg

func MockContextArg() any

MockContextArg returns a mock context.Context argument to be used in testify mock argument assertions.

Types

This section is empty.

Jump to

Keyboard shortcuts

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