Skip to content

Instantly share code, notes, and snippets.

@justinvdm
Created September 20, 2016 09:45
Show Gist options
  • Save justinvdm/f74848b80a268d71124e4a76ac9b6683 to your computer and use it in GitHub Desktop.
Save justinvdm/f74848b80a268d71124e4a76ac9b6683 to your computer and use it in GitHub Desktop.
diff --git a/src/views/CameraRoll/__tests__/index-test.js b/src/views/CameraRoll/__tests__/index-test.js
index a697710..18e4452 100644
--- a/src/views/CameraRoll/__tests__/index-test.js
+++ b/src/views/CameraRoll/__tests__/index-test.js
@@ -27,9 +27,11 @@ describe('CameraRoll', () => {
expect(render(createComponent())).toMatchSnapshot();
});
- it('should be able to tap and fire `onPhotoPress`', () => {
+ it('should be able to tap and fire `onPhotoPress`', async () => {
const onPhotoPress = jest.fn();
+
const el = shallow(createComponent({ onPhotoPress }));
+ await el.instance().componentDidMount();
el.findWhere(node => node.prop('photoId') === 1)
.simulate('press');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment