Skip to content

Commit 0bf8ee5

Browse files
committed
Add test for long press support
1 parent 0d56d86 commit 0bf8ee5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,4 +149,11 @@ describe('<Autolink />', () => {
149149
wrapper.children().find('Text').simulate('press');
150150
expect(onPress.calledWith('mailto:josh%40sportifik.com')).to.equal(true);
151151
});
152+
153+
it('should call long press handler when link long pressed', () => {
154+
const onLongPress = sinon.spy();
155+
const wrapper = shallow(<Autolink text="[email protected]" onLongPress={onLongPress} />);
156+
wrapper.children().find('Text').simulate('longPress');
157+
expect(onLongPress.called).to.equal(true);
158+
});
152159
});

0 commit comments

Comments
 (0)