Documentation ¶
Overview ¶
Package main contains a cli application that rewrites go source code containing test code using github.com/halimath/expect-go with a dot import and matchers from v0.1.0 to the same test code using github.com/halimath/expect v0.3.0 with regular imports. It handles most of the matchers (for some a manual work is needed), handels ExpectThat and EnsureThat but does not wrap multiple expectations into a single call to expect.That. Thus, this tool can reduce the amount of manual work needed when upgrading expect to v0.3.0 but some remainings are still needed in order to have readable, maintainable test code.
Usage:
- either: cat source_test.go | expect1to3 > source_test.go
- or: expect1to3 source_test.go
Click to show internal directories.
Click to hide internal directories.