Closed warang580 closed 8 years ago
There's an extra scenario as well which needs a test to cover off on it (note there is no .prompt
):
instead of this, you can do:
stimpak
.destination(process.cwd())
.answers({
"casted": "5",
"untouched": "5"
})
.cast(answer => parseInt(answer))
.generate(error => {
stimpak.answers().casted.should.eql(5);
stimpak.answers().untouched.should.eql("5");
});
I've added the test and cleaned the indentation with tabs only.
Just one question, what is the expected behaviour when doing this :
stimpak
.cast(answer => parseInt(answer))
.prompt(promptOne)
.prompt(promptTwo)
Are promptTwo answers (and also following prompts answers) also casted ? Or is it just the first .prompt() after .cast() ?
Just one question, what is the expected behaviour when doing this :
For now, I imagine the .cast working on all subsequent prompts, but in the future we could make it per-prompt
Very nice, I left a couple of formatting consideration notes