-
-
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 filenames in packages/jest circus #7301
Standardize filenames in packages/jest circus #7301
Conversation
- File, Function & Imports renamed - `export default (...` changed to `const formatNodeAssertErrors = (...` with `export default formatNodeAssertErrors` at end of file
- Rename file, function, imports, mocks, & tests
- Rename file only
- Forgot snapshot when renaming afterAll.test.js - Rename snapshot to match test filename
- Rename file & snap
- Added "it" to name to match CircusItTestError.test.js - Rename file
- Rename file
- Directory names should use dashes
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.
Still some files left to rename
@@ -10,10 +10,10 @@ | |||
|
|||
'use strict'; | |||
|
|||
import {runTest} from '../__mocks__/test_utils'; | |||
import {testUtils} from '../__mocks__/testUtils'; |
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.
runTest was a good name, please revert
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.
I'll rename testUtils
to runTest
. Leave the filename testUtils
?
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.
yup, leave it was :)
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.
Which files are left to rename?
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.
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.
Very good. I'll rename those as well
- jest_adapter.js -> jestAdapter.js - jest_adapter_init.js -> jestAdapterInit.js - jest_expect.js -> jestExpect.js - Fixed imports within directory and in runner.js
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
References Standardize file naming #4969.
Updates naming in package
jest-circus
. Uses conventions listed in #4969 (comment):Decisions
formatNodeAssertErrors.js
had an export of the formaterror_handlers.js
was renamedglobalErrorHandlers.js
to more closely match the two exported functions:injectGlobalErrorHandlers
&restoreGlobalErrorHandlers
legacy-code-todo-rewrite
directory was renamed, but the Javascript files inside were not renamed. It seems like a good way to help get them rewritten?Test plan
Output of
yarn run test
onmaster
andstandardize filenames in packages/jest circus
branches was the same, with the exception of one test which failed on master, but not this branch. Not sure what would cause that.jest-tests-master.txt
jest-tests-standardize-filenames-in-packages-jest-circus.txt