In my free time when working on open source projects, I typically find myself working on build tools and CLI type projects. These kind of projects, unlike the web apps I help build by day, typically take a combination of a user configuration file and some source code, and then generates some sort of output from that.
In this way, given a user's config and content, Greenwood can ensure critical features are still working and validate behavior like:
- Were the user's markdown files correctly converted to HTML?
- If they had a configuration file, were those options reflected in the output?
Gallinago is the standalone tool I created that allows one to essentially stub out an entire user's "workspace" and then run your CLI against it, and see (and test!) what the output is.
For example, if a user had a directory for their project like this in Greenwood:
src/ pages/ index.md blog/ first-post.md second-post.md styles/ theme.css
The generated output should be something like this:
public/ index.html blog/ 2020/ first-post.html second-post.html styles/ theme.bd54f1d4.css
Combined with Mocha, Greenwood can run its CLI against a bunch of pre-scaffolded directories simulating different user configurations and content types, and ensure the correct output each time.
I think that's...
So, please feel free to try it out and let me know what you think! ✌️