Skip to content

go-tstr/golden

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Reference codecov main

golden

Golden file testing is a technique where the expected output of a test is

  • generated automatically from test
  • stored in a separate file
  • verified to never change unless explicitly re-created

During testing, the actual output is compared against the contents of the golden file. If the outputs match, the test passes; if not, the test fails. This approach is especially useful for testing complex outputs such as JSON, HTML, or other structured data, as it makes it easy to review and update expected outputs.

About

Golden file test helper for Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •