DEV Community

Discussion on: How we wrote our CLI integration tests

Collapse
 
dantederuwe profile image
Dante De Ruwe

Very interesting approach and article. I'm not too familiar with integration test frameworks for CLI tools; so: are there existing ones too? If so: what made you decide on a custom approach? If not: would you consider creating an open-source framework around this approach? Curious to hear your thoughts!

Collapse
 
florianrappl profile image
Florian Rappl

Yeah, I don't know any (CLI integration test tools).

It's actually not so much custom as it is a very lightweight wrapper around Jest. So Jest is still doing the heavy lifting - all we implemented is a thin wrapper to make it more convenient (and the tests more readable).

Yeah I thought about about open-sourcing this, but since its really just 4-5 small files (that are at the moment quite coupled to our specific needs, e.g., starting / controlling something like a Piral feed service) I concluded that having an article would be sufficient. If in the future a generalization of that approach (i.e., open-sourcing this) would be helpful then sure - I can definitely see this happening!

Collapse
 
dantederuwe profile image
Dante De Ruwe

Sometimes a wrapper is all you need for a great DX I would believe :)
Either way like you said, this article also serves as a great inspiration.