-
-
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
refactor(jest-config)!: do not normalize long deprecated configuration options #12701
Conversation
@@ -1108,12 +1108,6 @@ If you want a path to be [relative to the root directory of your project](#rootd | |||
|
|||
For example, Jest ships with several plug-ins to `jasmine` that work by monkey-patching the jasmine API. If you wanted to add even more jasmine plugins to the mix (or if you wanted some custom, project-wide matchers for example), you could do so in these modules. | |||
|
|||
:::info | |||
|
|||
`setupTestFrameworkScriptFile` is deprecated in favor of `setupFilesAfterEnv`. |
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.
Hm.. I was sure this note was removed long time ago ;D
describe('testURL', () => { | ||
beforeEach(() => { | ||
jest.mocked(console.warn).mockImplementation(() => {}); | ||
describe('shards', () => { |
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.
Simply got moved up
|
||
it('logs a deprecation warning when `testURL` is used', async () => { | ||
describe('logs a deprecation warning', () => { |
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.
All warnings in one place.
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.
Awesome! Definitely time to remove
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
Perhaps it is time to remove normalization logic for long deprecated options? Looking at changelog:
preprocessorIgnorePatterns
deprecated since Jest 17scriptPreprocessor
deprecated since Jest 17setupTestFrameworkScriptFile
deprecated since Jest 24testPathDirs
deprecated since Jest 19They are needed in types, just for normalization logic. I was playing with schema generator, got somewhere with that (; The question is: what to do with deprecated options? Should they stay in schema? Maybe not... So, time to say goodbye?
Deprecation warnings are left in place. These look useful, I am just suggesting to get rid of normalization.
Test plan
Unit test is refactored. All should pass.