Last active
November 24, 2017 06:03
-
-
Save ferfabricio/9d4d253ff00266ef864de47d384d6786 to your computer and use it in GitHub Desktop.
Problema ao ler prepareStyles, workaround
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
import React from 'react' | |
import { TextField } from 'material-ui' | |
const Test = () => ( | |
<div> | |
<TextField /> | |
<TextField /> | |
</div> | |
); | |
export default Test; |
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
import React from 'react'; | |
import { shallow } from 'enzyme'; | |
import getMuiTheme from 'material-ui/styles/getMuiTheme'; | |
import Test from './Test'; | |
describe('Account test', () => { | |
it('Number of inputs presence must be equals 2', () => { | |
const component = shallow( | |
<Test />, | |
{ | |
context: { | |
muiTheme: getMuiTheme(), | |
}, | |
childContextTypes: { | |
muiTheme: PropTypes.object.isRequired, | |
} | |
} | |
); | |
expect(component.find('TextField').length).toBe(2) | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment