Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Golden Files Testing library for Go

License

NotificationsYou must be signed in to change notification settings

juntaki/fix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Reference

This library, like Ruby'svcr, serializes the results once executed and saves them as a file. You can easily write tests to verify that the code outputs the same results as in the past, even after modifying the code.

go get github.com/juntaki/fix

How to use

Append code like below to your tests. and Run test twice.

err := fix.Fix(&output) // output is dumped to a file.if err != nil {  t.Fatal(err)}

First test will fail, because juntaki/fix writes serialized data to file.From the second time, the test will pass, if output is the same as first output.

About

Golden Files Testing library for Go

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp