package assert
import "github.com/hack-pad/safejs/internal/assert"
Package assert contains small assertion test functions to assist in writing clean tests.
Index ¶
- func Equal(t *testing.T, expected, actual any) bool
- func EqualError(t *testing.T, err error, expected string) bool
- func NoError(t *testing.T, err error) bool
- func NotPanics(t *testing.T, fn func())
Functions ¶
func Equal ¶
Equal asserts actual is equal to expected
func EqualError ¶
EqualError asserts err.Error() is equal to expected
func NoError ¶
NoError asserts err is nil
func NotPanics ¶
NotPanics asserts fn() does not panic
Source Files ¶
- Version
- v0.1.1 (latest)
- Published
- Mar 5, 2023
- Platform
- windows/amd64
- Imports
- 2 packages
- Last checked
- 9 hours ago –
Tools for package owners.