refactor(jest-config)!: do not normalize long deprecated configuration options#12701
Merged
SimenB merged 4 commits intojestjs:mainfrom Apr 20, 2022
mrazauskas:refactor-config-normalize
Merged
refactor(jest-config)!: do not normalize long deprecated configuration options#12701SimenB merged 4 commits intojestjs:mainfrom mrazauskas:refactor-config-normalize
SimenB merged 4 commits intojestjs:mainfrom
mrazauskas:refactor-config-normalize
Conversation
mrazauskas
commented
Apr 20, 2022
|
|
||
| :::info | ||
|
|
||
| `setupTestFrameworkScriptFile` is deprecated in favor of `setupFilesAfterEnv`. |
Contributor
Author
There was a problem hiding this comment.
Hm.. I was sure this note was removed long time ago ;D
| describe('testURL', () => { | ||
| beforeEach(() => { | ||
| jest.mocked(console.warn).mockImplementation(() => {}); | ||
| describe('shards', () => { |
Contributor
Author
There was a problem hiding this comment.
Simply got moved up
| }); | ||
|
|
||
| it('logs a deprecation warning when `testURL` is used', async () => { | ||
| describe('logs a deprecation warning', () => { |
Contributor
Author
There was a problem hiding this comment.
All warnings in one place.
SimenB
approved these changes
Apr 20, 2022
Member
SimenB
left a comment
There was a problem hiding this comment.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.