-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[core] Add strict
option to createMount
#15317
Merged
Merged
Conversation
This file contains 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
No bundle size changes comparing 1e86a1c...be2e430 |
eps1lon
force-pushed
the
test/strict-mode
branch
2 times, most recently
from
April 11, 2019 15:55
9ea0c76
to
2dd5cc0
Compare
eps1lon
force-pushed
the
test/strict-mode
branch
from
April 11, 2019 16:28
b0e85c9
to
a009ffe
Compare
eps1lon
commented
Apr 11, 2019
@@ -39,7 +39,7 @@ describe('makeStyles', () => { | |||
let generateClassName; | |||
|
|||
before(() => { | |||
mount = createMount(); | |||
mount = createMount({ strict: undefined }); |
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 were some very confusing fails. It's probably not strict mode ready at all.
eps1lon
commented
Apr 11, 2019
eps1lon
force-pushed
the
test/strict-mode
branch
3 times, most recently
from
April 12, 2019 09:58
16a6e0b
to
8b51343
Compare
eps1lon
commented
Apr 12, 2019
packages/material-ui/src/SwipeableDrawer/SwipeableDrawer.test.js
Outdated
Show resolved
Hide resolved
eps1lon
commented
Apr 12, 2019
eps1lon
commented
Apr 13, 2019
eps1lon
changed the title
[test] Run in strict mode if possible
[core] Add Apr 13, 2019
strict
option to createMount
eps1lon
added
new feature
New feature or request
package: material-ui
Specific to @mui/material
labels
Apr 13, 2019
Makes code search easier
- Interfers with other tests - also polishes createMount
styles were still applied. maybe an issue with ReactDOM?
The actual issue is makeStyles
eps1lon
force-pushed
the
test/strict-mode
branch
from
April 13, 2019 14:09
5d64502
to
75f1c47
Compare
Co-Authored-By: eps1lon <[email protected]>
oliviertassinari
approved these changes
Apr 14, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Adds an option to
createMount
that allows mount tests to run in strict mode.Why is
strict: false
different thanstrict: undefined
?If you still rely on
childAt(0)
,dive
etc. consistently adding an additional level to the component tree allows toggling strict mode without changing your test assertions.own test suite changes
Runs every test that uses
createMount
either in strict mode or not.Implementation
https://github.com/mui-org/material-ui/pull/15317/files#diff-b24ed23497b02191114acc4c33e82796