-
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
adding tests for CLI functionality #1718
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1718 +/- ##
==========================================
- Coverage 66.67% 65.43% -1.24%
==========================================
Files 130 133 +3
Lines 2686 2743 +57
Branches 433 439 +6
==========================================
+ Hits 1791 1795 +4
- Misses 895 948 +53
|
This is a very simple implementation of what I could perceive. To test it out you can run ./index.js test We could test out individual functions like this. |
index-test.js
Outdated
program | ||
.option('--save-sequence [string]', 'Name space separated with Stringified sequence'); | ||
|
||
program.parse(['node', 'test', '--save-sequence']); |
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.
Oh cool, is this the key function, .parse()
? via Commander?
This looks great. Could we rename the file something like cli-test.js
or index-cli-test.js
so it's clear? And, perhspas should we place it in the test
directory?
Thanks so much! This is super awesome! And very readable!
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.
Oh cool, is this the key function,
.parse()
? via Commander?
Yup we pass can pass the user arguments through it. More info here
This looks great. Could we rename the file something like
cli-test.js
orindex-cli-test.js
so it's clear? And, perhspas should we place it in thetest
directory?
I named it index-test
since currently it's an standalone executable command for our program.
So the convention is ./index.js <name of command>
tries to find index-<name of command>
and execute it. More info here
I am still not familiar with the how exactly the current tests are running, I will try to move it to our test
directory once I get more familiar with it since it doesnt have a dependency on index.ts
as such so I believe that's possible.
Thanks so much! This is super awesome! And very readable!
Thanks 😄
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.
ahhh, i see. Yes, let's try to put it into test, but, if the convention doesn't accommodate subdirectories, we can just put a really clear explanatory comment at the top of the file. How does that sound? Thanks!!
Thank you! Would you be interested in being a feature-maintainer for the CLI suite? I believe it would be a pretty low commitment, as the CLI suite doesn't change much; all we're doing is building out our tests for CLI functionality. You can see a bit more on this here: #1633 |
@jywarren Sure. From what I understand I would need to keep it undisrupted as we progress with more features/modules once the suite has been somewhat made. The current focus would be building the suite. |
Hmm, test-ui-2 errored with:
The benchmark tests failed with an Electron installation issue. I restarted them to see if it's intermittent, like from an upstream download of electron? 🤞 |
Hmm, i'm seeing some odd messages here in Jest tests:
|
Restarting to see what happens! |
@jywarren I will look into it. I just tested it out by running the test file individually. Need to check how it behaves with jest. |
Awesome, thank you! |
@jywarren It seems that the test is failing because it's running part of the |
Hi! We should have better test documentation, you're right. For now you can try separating things better in Thank you!!! |
Oh awesome, you got tests passing! I'm updating the branch, let's see! |
Umm, will this be merged before v3.6.0? |
I wasn't going to, what do you think?
…On Thu, Oct 22, 2020, 9:57 AM Harsh Khandeparkar ***@***.***> wrote:
Umm, will this be merged before v3.6.0?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1718 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAF6J4DOOZZW3GDMV77ODLSMA25DANCNFSM4SGFG62Q>
.
|
Shall we make a project for 3.6.1? Or is this test suite an extra 3.7.0?
…On Thu, Oct 22, 2020, 9:58 AM Jeffrey Yoo Warren ***@***.***> wrote:
I wasn't going to, what do you think?
On Thu, Oct 22, 2020, 9:57 AM Harsh Khandeparkar ***@***.***>
wrote:
> Umm, will this be merged before v3.6.0?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#1718 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAAF6J4DOOZZW3GDMV77ODLSMA25DANCNFSM4SGFG62Q>
> .
>
|
I have already added this to the 3.6.1 project. 3.6.0 is ready, can you merge the last PR? Then we can merge this one... |
Great, merged that one. In the checklist in #1692 i have a few steps before we can resume merging to |
Congrats on merging your first pull request! 🙌🎉⚡️ |
Awesome!!!!! |
Potentially closes #1694
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!