Skip to content
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

chore: refactor tests + clean up unused code in SearchSource #12526

Merged
merged 16 commits into from
Mar 2, 2022
Merged

chore: refactor tests + clean up unused code in SearchSource #12526

merged 16 commits into from
Mar 2, 2022

Conversation

brandon-leapyear
Copy link
Contributor

Summary

These areas of the code were brought to my attention as part of #12519, but are good improvements independent of any other feature work.

Test plan

See the commit messages for the reasoning of each refactoring/clean up

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! lovely cutting and DRYing

@brandon-leapyear
Copy link
Contributor Author

Had to revert the path.normalize removal, also took the time to break up the "Refactor SearchSource tests" commit. Feel free to squash when merging; I just like breaking up commits for my personal workflow + to make commit-by-commit reviewing possible

@SimenB
Copy link
Member

SimenB commented Mar 2, 2022

Yeah, we squash on merge, but lots of commit within the PR is nice 👍

There are some failing tests, btw

@brandon-leapyear
Copy link
Contributor Author

Ok, hopefully I've fixed the tests. FYI locally, the import/order linter is saying

e2e/native-esm/__tests__/native-esm.test.js
  13:1  error  `node:dns` import should occur after import of `url`  import/order

✖ 1 problem (1 error, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.

but CI fails when making this change. Not sure why the discrepancy between local + CI

@SimenB
Copy link
Member

SimenB commented Mar 2, 2022

@brandon-leapyear yeah, unfortunately that rule behaves differently between node version (only considered "core" when it exists in the runtime.). Using Node 16 (maybe 14?) locally should make eslint agree with current formatting 🙂

@brandon-leapyear
Copy link
Contributor Author

@SimenB Not sure what that CI failure is. The test passes locally for me, and it doesn't seem related to my changes

@SimenB
Copy link
Member

SimenB commented Mar 2, 2022

yeah: #12521 (comment) 🙁

@SimenB
Copy link
Member

SimenB commented Mar 2, 2022

Thanks for this cleanup though, looks great!

@SimenB SimenB changed the title Refactor tests + clean up unused code chore: refactor tests + clean up unused code in SearchSource Mar 2, 2022
@SimenB SimenB merged commit ab74804 into jestjs:main Mar 2, 2022
@brandon-leapyear brandon-leapyear deleted the chinn/refactor branch March 2, 2022 07:37
@github-actions
Copy link

github-actions bot commented Apr 2, 2022

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants