-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
refactor(jest-config)!: do not normalize long deprecated configuration options #12701
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
Conversation
|
|
||
| :::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.
SimenB
left a comment
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:
preprocessorIgnorePatternsdeprecated since Jest 17scriptPreprocessordeprecated since Jest 17setupTestFrameworkScriptFiledeprecated since Jest 24testPathDirsdeprecated 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.