* Attempting to provide a useful implementation of something compatible with testing.T
* Handle Fail calls on the TestingT in the right place
* Provide as much of testing.T as possible + tidy up
* Add initial tests for testingT support
* Check compatibility with testing.T and friends
Co-authored-by: Piotr Bocheński <bochenski.piotr@gmail.com>
* Update assert-godogs example to show new usage. Rename 'GetTestingT(ctx)' to 'T(ctx)'
* Update changelog and readme with new usage
* Improve test coverage
* Review updates
---------
Co-authored-by: Piotr Bocheński <bochenski.piotr@gmail.com>
feat(*): create keyword functions
* chore(*): update messages and gherkin, relocate Keyword
* chore(*): update messages and gherkin, relocate Keyword
* chore(*): update messages and gherkin, relocate Keyword
* feat(*): mandate keyword type when unambiguous keyword function is used
* test(*): keyword type in feature files
* docs(*): update step-by-step walkthrough to mention the option of using keyword functions
* docs(*): update CHANGELOG.md
* test(*): keyword substeps
* chore(*): go mod
* Pretty Print when using rules (#440)
* Pretty Print when using rules (#440)
* fix a few formatting mistakes (#440)
* added test with rule and scenario outline (#440)
* Add new contextualized API for hooks and steps
* Make default context configurable
* Run AfterStep hooks even after failed steps, fixes#370
* Update CHANGELOG and README
* Add step result status to After hook, fixes#378
* Elaborate hooks documentation
* Add test to pass state between contextualized steps
* Update README with example of passing state between steps
Issue: It is not possible to use function without return when
matching steps, resulting in a lot of Nil only error
returns.
Fix: Allows to provide empty result function by correctly matching
reflect Calls on step Handler.
When nothing is returned by the Handler, it will return
nil as if errors was nil.
Context:
While trying to create an helper library to manage http rest api testing, I made a system witch allow to pick value from responses, header, cookie, ... and inject then as variables.
Issue:
Doing this, when the inject variable make the line longer than the longest declared step, godog will failed to render test result under pretty formatting cause it will try to write a comment on a negative index
Fix:
Fix s methods so it will not goes to fatal when recieving negative number.
This allows it to be easily re-used in other libraries to do
meta-testing on their own godog features/steps.
At some point it may make sense to migrate this entirely to a
sub-package of godog, however that would require a larger
re-architecting of the project structure to avoid circular dependencies
(e.g. `import cycle not allowed`).