zunit-zsh / zunit

A powerful testing framework for ZSH projects
https://zunit.xyz
MIT License
208 stars 23 forks source link

Better documentation #92

Closed psprint closed 6 years ago

psprint commented 6 years ago

The project seems to be interesting and enough-invested (>190 commits). But README doesn't provide examples. Can some examples be added?

BTW, maybe you will be interested – there's a tool that parses scripts using Zshell's (z) flag and extracts functions. I use it in one project – no need to load whole crasis script, instead the extracted functions are autoloaded. The extraction is zsd-transform, autoloads are in runtest.zsh: https://github.com/zdharma/zplugin-crasis/tree/master/test/bin

molovo commented 6 years ago

Did you check the documentation on the website: https://zunit.xyz

Lots of examples on there

And thanks for the tip about crasis, I'll take a look into it

psprint commented 6 years ago

Cool, thanks.

I should write more directly about the function extraction – the point is that it's hard to source whole source of a project because that would cause execution. What is needed are functions to be unit-tested – and zsd-transform provides this.