plopjs / plop

Consistency Made Simple
http://plopjs.com
MIT License
7.06k stars 277 forks source link

Can't write tests if the plopfile contains conditional prompts #438

Open HcySunYang opened 4 months ago

HcySunYang commented 4 months ago

I was trying to add tests for my project that is using plop to generate code.

For example:

image

But the tests couldn't be run, because plop will throw an error as it doesn't allow to bypass a conditional prompt, just want to know what is the correct way for writing tests like the scenario I encountered. Thanks

HcySunYang commented 4 months ago

SAO has the testing in mind when its author was designing it, but that project has not been actively updated for a long time, that's why I am looking at the plop, hope the plop taken the testing in mind as well.