tests

package
v0.0.0-...-0489fd7 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Equality matchers
	ShouldEqual       = convey.ShouldEqual
	ShouldNotEqual    = convey.ShouldNotEqual
	ShouldResemble    = convey.ShouldResemble
	ShouldNotResemble = convey.ShouldNotResemble
	ShouldPointTo     = convey.ShouldPointTo
	ShouldNotPointTo  = convey.ShouldNotPointTo
	ShouldBeNil       = convey.ShouldBeNil
	ShouldNotBeNil    = convey.ShouldNotBeNil
	ShouldBeTrue      = convey.ShouldBeTrue
	ShouldBeFalse     = convey.ShouldBeFalse
	ShouldBeZeroValue = convey.ShouldBeZeroValue

	// Numeric matchers
	ShouldBeGreaterThan          = convey.ShouldBeGreaterThan
	ShouldBeGreaterThanOrEqualTo = convey.ShouldBeGreaterThanOrEqualTo
	ShouldBeLessThan             = convey.ShouldBeLessThan
	ShouldBeLessThanOrEqualTo    = convey.ShouldBeLessThanOrEqualTo
	ShouldBeBetween              = convey.ShouldBeBetween
	ShouldNotBeBetween           = convey.ShouldNotBeBetween

	// Collection matchers
	ShouldContain    = convey.ShouldContain
	ShouldNotContain = convey.ShouldNotContain
	ShouldBeIn       = convey.ShouldBeIn
	ShouldNotBeIn    = convey.ShouldNotBeIn
	ShouldBeEmpty    = convey.ShouldBeEmpty
	ShouldNotBeEmpty = convey.ShouldNotBeEmpty
	ShouldHaveLength = convey.ShouldHaveLength

	// String matchers
	ShouldStartWith        = convey.ShouldStartWith
	ShouldNotStartWith     = convey.ShouldNotStartWith
	ShouldEndWith          = convey.ShouldEndWith
	ShouldNotEndWith       = convey.ShouldNotEndWith
	ShouldBeBlank          = convey.ShouldBeBlank
	ShouldNotBeBlank       = convey.ShouldNotBeBlank
	ShouldContainSubstring = convey.ShouldContainSubstring

	// Panic matchers
	ShouldPanic        = convey.ShouldPanic
	ShouldNotPanic     = convey.ShouldNotPanic
	ShouldPanicWith    = convey.ShouldPanicWith
	ShouldNotPanicWith = convey.ShouldNotPanicWith

	// Error matchers
	ShouldBeError = convey.ShouldBeError

	// Type matchers
	ShouldHaveSameTypeAs    = convey.ShouldHaveSameTypeAs
	ShouldNotHaveSameTypeAs = convey.ShouldNotHaveSameTypeAs
	ShouldImplement         = convey.ShouldImplement
	ShouldNotImplement      = convey.ShouldNotImplement
)

Re-export common matchers from GoConvey

Functions

func Context

func Context(description string, fn func())

Context describes a specific context or scenario within a test Maps to RSpec's "context"

func Describe

func Describe(description string, t *testing.T, fn func())

Describe is the top-level container for a group of tests Maps to RSpec's "describe"

func Expect

func Expect(actual any, assertion convey.Assertion, expected ...any)

Expect is an alias for So() to make assertions more readable Usage: Expect(value, ShouldEqual, expected)

func It

func It(description string, fn func())

It describes a specific behavior or expectation Maps to RSpec's "it"

Types

This section is empty.

Jump to

Keyboard shortcuts

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