-
Notifications
You must be signed in to change notification settings - Fork 210
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
refactor cli code #1785
refactor cli code #1785
Conversation
test/cli/templates/cli-test.js
Outdated
'--save-sequence [string]', | ||
'Name space separated with Stringified sequence' | ||
) | ||
.option( |
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.
Are these the only options? What if they are changed in the future? Can it be dynamically loaded from the sequencer file?
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.
I will have to look into it. It seems like the options are manually defined in index.js
.
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.
O:+1:
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.
Yes, it does seem like we're almost rebuilding the CLI in order to test the CLI here. Maybe we need cliTest()
to accept an argument and use it in each test with just cliTest('--save-sequence [string]')
-- so that we can see the scope of each test? Or something like that...
I refactored the entire program into another file. Hopefully this makes more sense and will make it easy to test, since we will get exactly the output that cli would do and no need to mimic them repetitively. |
I will revert the commit, if this is out of scope of this PR, or may need to retitle the PR. |
Can we put it inside |
I wonder why it wasn't complaining earlier when the same code was in |
So it wasn't exclusive to module.exports 😓 |
It was probably failing before too but was ignored. |
This comment has been minimized.
This comment has been minimized.
Oh wow! I hope to have time to review in the next few days. In the meantime, i appreciate reviews from anyone else, thank you!!! |
Nice!!!!!! Thanks all!!! 🔥🔥🔥 |
Ref #1747
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!
npm run test-all
@publiclab/is-reviewers
for help, in a comment belowIf tests do fail, click on the red
X
to learn why by reading the logs.Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software
Please make sure to get at least two reviews before asking for merging the PR as that would make the PR more reliable on our part
Thanks!