Created
September 16, 2018 18:47
-
-
Save janhesters/561c1ae1817ab3ee52ded367dc39f734 to your computer and use it in GitHub Desktop.
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 App from './App'; | |
import { shallow, ShallowWrapper } from 'enzyme'; | |
import React from 'react'; | |
import { View } from 'react-native'; | |
const createTestProps = (props: Object) => ({ | |
...props | |
}); | |
describe("App", () => { | |
describe("rendering", () => { | |
let wrapper: ShallowWrapper; | |
let props: Object; | |
beforeEach(() => { | |
props = createTestProps({}); | |
wrapper = shallow(<App {...props} />); | |
}); | |
it("should render a <View />", () => { | |
expect(wrapper.find(View)).toHaveLength(1); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment