franela / goblin

Minimal and Beautiful Go testing framework
MIT License
884 stars 79 forks source link

Documentation for Before and After #112

Open caldempsey opened 1 year ago

caldempsey commented 1 year ago

Hi Goblin,

Unsure what Before and After mean (after all or before all or after each or before each)? Can we add some documentation on the After block to provide that. Happy to submit a pull request, just need clarification myself.

Thanks for the great framework. Go was really missing a clean lightweight solution for BDD.

marcosnils commented 1 year ago

Hey there!

Goblin is heavily inspired by Nodejs mocha's testing framework (https://mochajs.org/). Regarding before, after, beforeEach and afterEach, they work the same way as mocha's (https://mochajs.org/api/module-interfaces_common.html).

If you want to send a PR to help clarify this in the README, i'll happily merge it.

caldempsey commented 1 year ago

@marcosnils Yeah would like to make a contribution for my badges, seems like a good one. Really think adding solid docs with key-words that get caught in Google will help show the Go community the value of BDD syntax. Many of us are stuck with the 'testing' framework, doesn't have the tools you want if you're test-driven IMHO.

Will try to get something in within the next fortnight.