nao1215 / spectest

A simple and extensible behavioural testing library for Go. You can use api test to simplify REST API, HTTP handler and e2e tests.
MIT License
37 stars 1 forks source link

`spectest index` command standard outputs the index markdown file path after generated it. #168

Closed nao1215 closed 11 months ago

nao1215 commented 1 year ago

Is your feature request related to a problem? Please describe.

After generating the index markdown, spectest index does not output anything. I think it is difficult for the user to understand what happened with this specification. Therefore, the generated index file path will be outputted to the standard output.

Describe the solution you'd like

If markdown.GenerateIndex() completes successfully, it will output the index file path to the standard output. If an error occurs, it will directly return the error to the higher-level function. https://github.com/go-spectest/spectest/blob/26de85c47a740f596035376cf4b84e09ac9c7fc2/cmd/spectest/sub/index.go#L59-L62

nao1215 commented 11 months ago

Done https://github.com/go-spectest/spectest/pull/210