-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Guidance on how to test scaffolds #122
Comments
You can supply arguments after the path, we do some "basic" logic to turn those arguments into variables See Lines 177 to 183 in f5e7489
This isn't something I thought a ton about so I'm happy to consider alternative APIs and/or fix issues with this approach. |
Okay, I did some more digging and it looks like this isn't possible, you will always be prompted. I see two options here Option 1 Add Option 2 Add a test:
Var1: value 1
Var2: value 2 I'm more keen on option 2, but I'm open to any suggestions you have |
I'd like to know that the content of the scaffold produces a working output, by writing a simple automation to call
scaffold
, thencd
into the new folder and run something on the code inside.I tried several of the techniques on https://www.baeldung.com/linux/bash-interactive-prompts to supply prompt answers over stdin, but have errors like:
Alternatively I suppose you could have a first-class support for testing by allowing the
scaffold
CLI to accept a "script" with expected prompts and supplied answers.The text was updated successfully, but these errors were encountered: