-
Notifications
You must be signed in to change notification settings - Fork 251
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(Command test runner): Add command test runner #1047
Conversation
Add the command test runner. This test runner simply runs command from the bash/cmd prompt. It defaults to `npm test`
What are your thoughts on the integration with |
For
How would we communicate that this option is much slower? Configuring a test framework doesn't make sense anymore. The test runner does not support test selection. Good point, I will implement a fail fast for this. |
I've altered the first question to look like this: This should be clear enough. If you select "command", the test framework question is skipped. I've created #1049 for preset support. Let's not do that in this PR. |
Implement timeout functionality by implementing the `dispose` call. This kills the child process and resolves the promise as a timeout (to prevent a memory leak)
I just totally forgot about the timeout functionality. Implemented now. |
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.
Finally got to review this! Looks great! Did you have any issues with zombie sub sub processes?
Do you have an open source project where you had these issues? Because then we could try it out :) we are pretty thorough with killing processes. |
I don't quite remember which one it was exactly, but for sure it's in the top 20 most depended upon npm modules and I think it ran karma. I can't really remember which one it was. I should have documented it, sorry :( |
No problem :) |
This code is really clean. Nice job @nicojs! 💖 |
Add the command test runner. This test runner simply runs command from the bash/cmd prompt. It defaults to
npm test
.It will always report exactly one test result (called
'All tests'
), as it cannot distinguish between the tests. It is implemented differently from other test runners, as we don't want to spawn this one in a separate process (it already usesrequire('child_process').exec
to start a test run).Fixes #768