Releases: corbym/gogiven
Releases · corbym/gogiven
Test Comments Enhancement
This release includes:
- Test comments (comments immediately before the test) are now parsed and added to
PageData
- Structural changes to
PageData
andSome
structs to accommodate comments - gometalinter improvements to return types and a full review of pointer usage.
PageData
is now passed by reference rather a pointer.- many an Id field is now ID - be aware :)
Some
struct has been given public scope
- Example tests from git README are now generated by the build and deployed to github pages.
- some structs have package changes - testvisitor now moved to base for example
Ouput listeners and interface changes
- add json file extension type to mime so we don't barf over json files
- Added OutputListener interface and global array so we can notify output listeners of content generation instead of coupling output to files.
- refactor so that Generate now returns io.Reader for more flexible output. Matt Corby 24/01/2018 22:23
Refactor of interfaces and types
PageData and internal structs have had an overhaul. This is a breaking change.
Formatting improvements
Improvements to the parsing of the test function are in this release.
- The Given/When/Then is now parsed into a string array and stripped of eol
- Comments are now converted to "Noting that .." format in place
- Quoted inline text is formatted correctly, used to be " foo " now "foo"
This is a breaking change, GivenWhenThen is now an array of strings.
Non-breaking change enhancements
Enhancements:
- "When" can now be called without Given
- Test Id now uses testing.T's TestName instead of the func name
- Now able to skip tests and register the skip with the test output
- Given/When/Then formatting improved
- Captured IOs and Interesting Givens now use interface{} for map keys