[typescript] Dependency on `enzyme` should be abstracted
See original GitHub issueProblem description
The typings contain a dependency on enzyme
that would require anyone using material-ui
with typescript
to also install @types/enzyme
, and also enzyme
for testing.
Steps to reproduce
N/A
Versions
- Material-UI: 1.0.0-beta.6
- React: N/A
- Browser: N/A
Description
I would like to suggest the testing utils specific to enzyme
be moved into another package (e.g. material-ui-enzyme
). Any testing utilities that come with material-ui
should probably only depend on React itself so as to leave developers the freedom of choice with it comes to testing.
Images & references
N/A
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:10 (8 by maintainers)
Top Results From Across the Web
[typescript] Dependency on enzyme should be abstracted #7929
I would like to suggest the testing utils specific to enzyme be moved into another package (e.g. material-ui-enzyme ). Any testing utilities ...
Read more >Understanding the dependency inversion principle in TypeScript
The first principle states that both high-level and low-level modules should depend on the same abstractions.
Read more >React project (using Typescript and Styled Components ...
Recently I was tasked to setup Jest and Enzyme Testing for the ... Above is not a dev dependency, so we will install...
Read more >Which Enzyme adapter works with React 17? - Stack Overflow
You should aim to test the behaviour of your component, thus if you correctly abstracted a component and behaviour changes... you can capture...
Read more >typescript extend class constructor - Lena's Italian Restaurant
Define an abstract class in Typescript using the abstract keyword. ... In reality, the child class must also specify the dependencies of the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Alright, I’m going to close the issue. To sum up:
material-ui-test
package (so we can have a finer grain control on the dependency and peer dependency). This is something we started discussing here #7839. But, this has an important maintenance cost. For now, I do think that it would be better to wait and see if that worth it.Thanks for the discussion, we can always reopen the issue if you don’t agree, or want to push into a different direction.
👍