-
-
Notifications
You must be signed in to change notification settings - Fork 32.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
[test] Deprecate test-utils #24099
[test] Deprecate test-utils #24099
Conversation
@material-ui/core: parsed: +Infinity% , gzip: +Infinity% Details of bundle changes.Comparing: dc4cf94...d9ff0f7 Details of page changes
|
before(() => { | ||
// Trigger deprecation warning. | ||
try { | ||
stub(console, 'warn'); | ||
findOutermostIntrinsic(); | ||
} catch (error) { | ||
// ignore | ||
} finally { | ||
console.warn.restore(); | ||
} | ||
}); | ||
|
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.
Ultimately we'd like to reset modules between each test so that we could test this properly. But we don't have any such API (like jest.resetModules
). Though we might want to add per-module methods that manually take care of this and which we strip from the published code. Just typing this out loud for future reference. Right now I don't think it's worth it.
Add deprecations for #21855.
Closes #24074 to prevent diverging branches even further.
git cherry-pick 44db8eee444191ec19caf130d5a0e4b0bdf1755a -X ours
/core/test-utils