First, take a look through the to get the basic idea. We'd recommend reviewing isolated_execution_test.go for a more thorough understanding of how you can compose test cases.
See for exported functions and assertions. You'd be most interested in the convey package.
(Notice the dot-notation for the package, for convenience.)
Since GoConvey uses go test
, set up a Test function:
There's a working GoConvey test. Notice that we pass in the object. Only the top-level calls to Convey()
require that. For nested calls, you must omit it. For instance:
If you haven't yet implemented a test or scope, just set its function to to it: