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 |
|
|
||
| * `[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.
good catch! didn't realize it was below a release number. I'll fix
ghost
left a comment
There was a problem hiding this comment.
explaining a few changes that came about in this pr that aren't as clear as renaming a file or changing an import
|
|
||
| * `[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)) |
| 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.
updated this snapshot because of file names changing, but if you look, you can see no number changed 👍
| ------------|----------|----------|----------|----------|----------------| | ||
| 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.
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.
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.
actually, this snapshot is now missing OtherFile after renaming it from other-file to OtherFile
|
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-testsfolders and sub-folders onlyDetails
Now files in root can follow standard FB practice:
Test plan
Relying on
yarn testand CI tests to pass.Let me know if I've missed something.