jest
jest copied to clipboard
Add validation wrapper for PatternPrompt class
Summary
Due to https://github.com/facebook/jest/issues/7382
Test plan
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.
If you have received this in error or have any questions, please contact us at [email protected]. Thanks!
@SimenB Can you please check the algorithm of my fix? I had not add tests because I'm not sure if my code fit the jest code styleguide.
@SerhiiBilyk Are you still working on this? I'd still love this feature to be included. I keep fat fingering things in watch mode.
@natealcedo, I am waiting for review now
@SimenB @rickhanlonii @rogeliog screenshots:

@rickhanlonii @SimenB Can you please help me with testing?
@SerhiiBilyk I would suggest just writing all the tests first and then asking for a review. If you are unsure on how to write tests you should take a look at the CONTRIBUTING.md. That way, reviewers can give feedback on all of your code at one go rather than waiting for a review before writing tests.
@natealcedo ok.
@SimenB @rickhanlonii I've add e2e tests. Like I understand , unit tests of PatternPrompt are in jest-cli/src/tests/watch_filename_pattern_mode.test. But I don't know how to configure them. I will appreciate for any help. Thank you
Like I understand , unit tests of PatternPrompt are in jest-cli/src/tests/watch_filename_pattern_mode.test
Yes, and in watch_test_name_pattern_mode.test. You could for example copy the test case "Pressing P enters pattern mode" and modify it so that it types an invalid pattern and tries to press enter, and then assert that Jest does not try to rerun with the invalid pattern.
@jeysal thank you for your tip. Can you check please my unit test?
btw, @SerhiiBilyk can you rebase your work to master? jest-watcher was recently converted to TypeScript
@jeysal thank you for your tip. Can you check please my unit test?
Looking good, that's what I thought of 👍 As @thymikee said, the TypeScript migration unfortunately causes a few conflicts for existing PRs so you'll have to rebase, then we can give it a final review :)
Don't worry too much about the conflict, we can resolve that ourselves before merging 🙂
@thymikee @jeysal @SimenB branch is rebased
Is it still relevant ?
Yeah, I'd say so! Would you mind rebasing?
I agree, this is still relevant
@SimenB @thymikee Sorry, but I will have no time to do thi PR until September. So, feel free to reassign this PR to other people
This PR is stale because it has been open 1 year with no activity. Remove stale label or comment or this will be closed in 30 days.
This PR was closed because it has been stalled for 30 days with no activity. Please open a new PR if the issue is still relevant, linking to this one.
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.