-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(server): add stdin option to API #2186
Conversation
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.
/cc @hiroppy
test/cli/cli.test.js
Outdated
); | ||
const childProcess = testBin(false, configPath, true); | ||
|
||
setTimeout(() => { |
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.
plz use timer
. await timer(500)
test/cli/cli.test.js
Outdated
childProcess.stdin.pause(); | ||
}, 500); | ||
|
||
setTimeout(() => { |
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.
ditto
test/cli/cli.test.js
Outdated
); | ||
const childProcess = testBin('--stdin', configPath); | ||
|
||
setTimeout(() => { |
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.
ditto
Codecov Report
@@ Coverage Diff @@
## next #2186 +/- ##
==========================================
+ Coverage 93.47% 96.05% +2.57%
==========================================
Files 33 34 +1
Lines 1242 1191 -51
Branches 365 346 -19
==========================================
- Hits 1161 1144 -17
+ Misses 72 46 -26
+ Partials 9 1 -8
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## next #2186 +/- ##
==========================================
+ Coverage 93.47% 96.05% +2.57%
==========================================
Files 33 34 +1
Lines 1242 1191 -51
Branches 365 346 -19
==========================================
- Hits 1161 1144 -17
+ Misses 72 46 -26
+ Partials 9 1 -8
Continue to review full report at Codecov.
|
Need to update documentation. |
* feat(server): add stdin for api * test(stdin): switch to async await tests for stdin * test(cli): use await timer
* feat(server): add stdin for api * test(stdin): switch to async await tests for stdin * test(cli): use await timer
* feat(server): add stdin for api * test(stdin): switch to async await tests for stdin * test(cli): use await timer
* feat(server): add stdin for api * test(stdin): switch to async await tests for stdin * test(cli): use await timer
* feat(server): add stdin for api * test(stdin): switch to async await tests for stdin * test(cli): use await timer
* feat(server): add stdin for api * test(stdin): switch to async await tests for stdin * test(cli): use await timer
* feat(server): add stdin for api * test(stdin): switch to async await tests for stdin * test(cli): use await timer
* feat(server): add stdin for api * test(stdin): switch to async await tests for stdin * test(cli): use await timer
For Bugs and Features; did you add new tests?
Yes
Motivation / Use-Case
This makes stdin an option for both CLI and API, and helps in moving configuration changes out of the CLI for CLI refactor.
Same PR as #2106, but moved to
next
. It was faster to do this than an ugly rebase.Breaking Changes
None,
stdin
will work the same as it did before on CLI.Additional Info