be_ctx

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ctx

func Ctx(args ...any) types.BeMatcher

Ctx succeeds if the actual value is a context.Context. If no arguments are provided, it matches any context.Context. Otherwise, it uses the Psi matcher to match the provided arguments against the actual context's values.

func CtxWithDeadline

func CtxWithDeadline(deadline any) types.BeMatcher

CtxWithDeadline succeeds if the actual value is a context.Context and its deadline matches the provided deadline.

func CtxWithError

func CtxWithError(err any) types.BeMatcher

CtxWithError succeeds if the actual value is a context.Context and its error matches the provided error value.

func CtxWithValue

func CtxWithValue(key any, vs ...any) types.BeMatcher

CtxWithValue succeeds if the actual value is a context.Context and contains a key-value pair where the key matches the provided key and the value matches the provided arguments using any other matchers.

Types

This section is empty.

Jump to

Keyboard shortcuts

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