-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Standardize file names in integration-tests #5513
Conversation
Do you mind rebasing this and making sure CI passes? |
Codecov Report
@@ Coverage Diff @@
## master #5513 +/- ##
=======================================
Coverage 61.67% 61.67%
=======================================
Files 213 213
Lines 7160 7160
Branches 4 3 -1
=======================================
Hits 4416 4416
Misses 2743 2743
Partials 1 1
Continue to review full report at Codecov.
|
Mind fixing the |
CHANGELOG.md
Outdated
* `[filenames]` Standardize file names in root | ||
([#5500](https://github.com/facebook/jest/pull/5500)) | ||
* `[filenames]` Standardize files names in "integration-tests" folder ([#5513](https://github.com/facebook/jest/pull/5513)) |
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.
should be under master
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.
good catch! didn't realize it was below a release number. I'll fix
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.
explaining a few changes that came about in this pr that aren't as clear as renaming a file or changing an import
CHANGELOG.md
Outdated
* `[filenames]` Standardize file names in root | ||
([#5500](https://github.com/facebook/jest/pull/5500)) | ||
* `[filenames]` Standardize files names in "integration-tests" folder ([#5513](https://github.com/facebook/jest/pull/5513)) |
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.
updated changelog
other-file.js | 100 | 100 | 100 | 100 | | | ||
sum.js | 85.71 | 100 | 50 | 85.71 | 12 | | ||
sum_dependency.js | 0 | 0 | 0 | 0 | 8,10,11,14 | | ||
OtherFile.js | 100 | 100 | 100 | 100 | | |
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.
updated this snapshot because of file names changing, but if you look, you can see no number changed 👍
@@ -5,7 +5,7 @@ exports[`babel-jest instruments only specific files and collects coverage 1`] = | |||
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | | |||
------------|----------|----------|----------|----------|----------------| | |||
All files | 83.33 | 100 | 50 | 83.33 | | | |||
covered.js | 83.33 | 100 | 50 | 83.33 | 15 | | |||
Covered.js | 83.33 | 100 | 50 | 83.33 | 15 | |
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.
updated this snapshot since name changed
'<rootDir>/reporters/test_reporter.js', | ||
{'Dmitrii Abramov': 'Awesome'}, | ||
], | ||
['<rootDir>/reporters/TestReporter.js', {'Dmitrii Abramov': 'Awesome'}], |
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.
prettier was failing on this, so i changed it until atom didn't complain
@SimenB for the lint warnings for the filenames, I thought we don't want snake case anymore. So what's the suggested path for fixing these? |
The fix for lint is to change the rule to match the new convention 🙂 |
Ok so the problem with changing the lint rule is that the convention wants to support multiple styles (camelCase and pascalCase) and the lint rule only allows one style (as far as i understand). Lint RuleHere's how to change the lint rule: https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/filename-case.md File Naming ConventionsHere's the file naming conventions as I understand them:
|
@SimenB could be wrong but looks like the lint rule only allows one case to be defined for file names: https://github.com/sindresorhus/eslint-plugin-unicorn/blob/b7e4afbf6562b93d88f6c652a64df72316c73004/rules/filename-case.js#L101 |
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | | ||
----------|----------|----------|----------|----------|----------------| | ||
All files | 0 | 100 | 100 | 0 | | | ||
setup.js | 0 | 100 | 100 | 0 | 8 | |
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.
actually, this snapshot is now missing OtherFile
after renaming it from other-file
to OtherFile
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.
If multiple styles are not supported, then we should remove the rule, I think |
Can you remove |
@SimenB done 👍 |
- updated tests - added to changelog
@SimenB just fixed some more conflicts. Since this pr touches so many of the integration tests, can you give another review? I'm starting to get tired of keeping this up to date |
@baldwmic thanks for sticking with us. The Jest project moves fast and lots of people contribute stuff to it, sorry it took a while to get this merged. |
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. |
Summary
More work on #4969.
integration-tests
folders and sub-folders onlyDetails
Now files in root can follow standard FB practice:
Test plan
Relying on
yarn test
and CI tests to pass.Let me know if I've missed something.