-
Notifications
You must be signed in to change notification settings - Fork 70
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
Make scarb new and init command interactive #1472
Conversation
Would you be able to add any tests for that? |
3a87409
to
a48e85a
Compare
a48e85a
to
ea12162
Compare
Regarding the tests, the task is harder than it seemed. We can't run this as We can write unit tests by adjusting the function signature as follows: pub fn ask_for_test_runner<F>(prompt: F) -> Result<TestRunner>
where
F: FnOnce(Vec<&str>) -> InquireResult<&str> and then mocking the prompt. However, if you think e2e tests are really important, I can try to research this topic further and maybe find a solution to run them. |
That's why I asked 😃 If it's too hard, I can live without tests (is this a problem with getting output only, or are the files not created on CI? 🤔 ). Unit approach is not worth it imho, as it mocks exactly what we would want to test in this scenario. |
The issue is getting input; it seems it is incorrectly passed. I haven't debugged it, though. |
c44da4b
to
768f592
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make sure to use the new env var in snforge init
after this is merged :D
64283a0
to
c3e51b3
Compare
Closes #1207
Closes #1982
Make scarb new and init command interactive