package assert

import "github.com/hack-pad/safejs/internal/assert"

Package assert contains small assertion test functions to assist in writing clean tests.

Index

Functions

func Equal

func Equal(t *testing.T, expected, actual any) bool

Equal asserts actual is equal to expected

func EqualError

func EqualError(t *testing.T, err error, expected string) bool

EqualError asserts err.Error() is equal to expected

func NoError

func NoError(t *testing.T, err error) bool

NoError asserts err is nil

func NotPanics

func NotPanics(t *testing.T, fn func())

NotPanics asserts fn() does not panic

Source Files

assert.go

Version
v0.1.1 (latest)
Published
Mar 5, 2023
Platform
js/wasm
Imports
2 packages
Last checked
8 hours ago

Tools for package owners.