Skip to content

A minimalistic, zero-dependency testing helper for Go

License

Notifications You must be signed in to change notification settings

FrogoAI/testutils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

testutils

A minimalistic, zero-dependency testing helper for Go.

testutils is a lightweight alternative to heavy assertion libraries like testify/assert. It provides a single "Swiss Army knife" function—Equal—that intelligently handles assertions for all kinds of data types, reducing boilerplate without bloating your go.mod.

Key Features

  • The "Switch Knife" Function: One function (Equal) capable of comparing scalars, errors, structs, slices, and maps. You don't need AssertNil, AssertMapEqual, or AssertString.
  • Zero Dependencies: Keeps your project's dependency graph clean.
  • Reflect-Based: Automatically handles deep equality checks for complex structures, making it a powerful drop-in for standard Go testing.
  • Readable Output: formatted error messages when assertions fail, making debugging easier.

About

A minimalistic, zero-dependency testing helper for Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages