Releases: beme/abide
Bug Fixes
Bug Fixes
Bug Fixes
Support for HTTP Headers in config defaults
Assert HTTP Requests
This release enables the user to run assertions against HTTP Requests.
Methods
func AssertHTTPRequestOut(t *testing.T, id string, r *http.Request)
func AssertHTTPRequest(t *testing.T, id string, r *http.Request)
Contributors
Set Custom Snapshot Directory
This release enables the user to set a custom path for the snapshot directory.
Usability
#39 - The user can set an alternate snapshot directory, which continues to default to __snapshots__
.
func init() {
abide.SnapshotDir = "testdata"
}
Miscellaneous
TravisCI updated to check Go v1.8.x-1.10.x and tip, as well as run gofmt
, golint
, and go vet
.
Contributors
Bug Fixes
Improved Snapshot Feedback
This release includes the snapshot id in the test output as appropriate to improve usability.
Usability
#32 - Feedback in the console now includes the snapshot identifier for extra clarity when a snapshot is first created or when output does not match.
## Existing snapshot does not match results...
## snapshot-foobar
diff
Miscellaneous
Better support for various declarations of the JSON Content-Type.
Contributors
AssertReader and Improved Docs
This release adds a new method for testing io.Reader
, improves documentation, and resolves a usability issue.
Methods
AssertReader(t *testing.T, id string, r io.Reader)
In addition to testing http.Response
and Assertable
, abide can now directly test io.Reader
.
Documentation
Godocs have been improved upon and examples for most methods have been added.
Usability
#26 - When a snapshot is first "identified," the output will be included in tests logs, and the test will intentionally fail. This is by design, and is meant to provide the developer an opportunity to confirm the output is correct before saving. When it is correct, it can be saved (in the same way it is updated) via $ go test -- -u
.
Initial Release
Initial Release