Skip to content

Commit 6ee7b37

Browse files
committed
Use example.com emails in tests
1 parent 0bf8ee5 commit 6ee7b37

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

test/test.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ describe('<Autolink />', () => {
2525
});
2626

2727
it('should wrap an email address in a Text node when email prop enabled', () => {
28-
const wrapper = shallow(<Autolink text="josh@sportifik.com" email />);
28+
const wrapper = shallow(<Autolink text="josh@example.com" email />);
2929
expect(wrapper.find('Text')).to.have.length(2);
3030
});
3131

3232
it('should not wrap an email address in a Text node when email prop disabled', () => {
33-
const wrapper = shallow(<Autolink text="josh@sportifik.com" email={false} />);
33+
const wrapper = shallow(<Autolink text="josh@example.com" email={false} />);
3434
expect(wrapper.find('Text')).to.have.length(1);
3535
});
3636

@@ -82,7 +82,7 @@ describe('<Autolink />', () => {
8282
it('should link multiple elements individually', () => {
8383
const wrapper = shallow(
8484
<Autolink
85-
text="Hi @josh (josh@sportifik.com or 415-555-5555), check out https://github.com/joshswan/react-native-autolink. It's #awesome!"
85+
text="Hi @josh (josh@example.com or 415-555-5555), check out https://github.com/joshswan/react-native-autolink. It's #awesome!"
8686
email
8787
hashtag="instagram"
8888
mention="twitter"
@@ -132,27 +132,27 @@ describe('<Autolink />', () => {
132132

133133
it('should use function to render links if passed using renderLink prop', () => {
134134
const renderLink = (text, match, index) => <Text>{`${text}:${index}`}</Text>;
135-
const wrapper = shallow(<Autolink text="josh@sportifik.com" renderLink={renderLink} />);
136-
expect(wrapper.contains(<Text>josh@sportifik.com:0</Text>)).to.equal(true);
135+
const wrapper = shallow(<Autolink text="josh@example.com" renderLink={renderLink} />);
136+
expect(wrapper.contains(<Text>josh@example.com:0</Text>)).to.equal(true);
137137
});
138138

139139
it('should call press handler when link clicked', () => {
140140
const onPress = sinon.spy();
141-
const wrapper = shallow(<Autolink text="josh@sportifik.com" onPress={onPress} />);
141+
const wrapper = shallow(<Autolink text="josh@example.com" onPress={onPress} />);
142142
wrapper.children().find('Text').simulate('press');
143143
expect(onPress.called).to.equal(true);
144144
});
145145

146146
it('should call press handler with appropriate Linking url', () => {
147147
const onPress = sinon.spy();
148-
const wrapper = shallow(<Autolink text="josh@sportifik.com" onPress={onPress} />);
148+
const wrapper = shallow(<Autolink text="josh@example.com" onPress={onPress} />);
149149
wrapper.children().find('Text').simulate('press');
150-
expect(onPress.calledWith('mailto:josh%40sportifik.com')).to.equal(true);
150+
expect(onPress.calledWith('mailto:josh%40example.com')).to.equal(true);
151151
});
152152

153153
it('should call long press handler when link long pressed', () => {
154154
const onLongPress = sinon.spy();
155-
const wrapper = shallow(<Autolink text="josh@sportifik.com" onLongPress={onLongPress} />);
155+
const wrapper = shallow(<Autolink text="josh@example.com" onLongPress={onLongPress} />);
156156
wrapper.children().find('Text').simulate('longPress');
157157
expect(onLongPress.called).to.equal(true);
158158
});

0 commit comments

Comments
 (0)