@@ -25,12 +25,12 @@ describe('<Autolink />', () => {
25
25
} ) ;
26
26
27
27
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 /> ) ;
29
29
expect ( wrapper . find ( 'Text' ) ) . to . have . length ( 2 ) ;
30
30
} ) ;
31
31
32
32
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 } /> ) ;
34
34
expect ( wrapper . find ( 'Text' ) ) . to . have . length ( 1 ) ;
35
35
} ) ;
36
36
@@ -82,7 +82,7 @@ describe('<Autolink />', () => {
82
82
it ( 'should link multiple elements individually' , ( ) => {
83
83
const wrapper = shallow (
84
84
< 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!"
86
86
email
87
87
hashtag = "instagram"
88
88
mention = "twitter"
@@ -132,27 +132,27 @@ describe('<Autolink />', () => {
132
132
133
133
it ( 'should use function to render links if passed using renderLink prop' , ( ) => {
134
134
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 ) ;
137
137
} ) ;
138
138
139
139
it ( 'should call press handler when link clicked' , ( ) => {
140
140
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 } /> ) ;
142
142
wrapper . children ( ) . find ( 'Text' ) . simulate ( 'press' ) ;
143
143
expect ( onPress . called ) . to . equal ( true ) ;
144
144
} ) ;
145
145
146
146
it ( 'should call press handler with appropriate Linking url' , ( ) => {
147
147
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 } /> ) ;
149
149
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 ) ;
151
151
} ) ;
152
152
153
153
it ( 'should call long press handler when link long pressed' , ( ) => {
154
154
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 } /> ) ;
156
156
wrapper . children ( ) . find ( 'Text' ) . simulate ( 'longPress' ) ;
157
157
expect ( onLongPress . called ) . to . equal ( true ) ;
158
158
} ) ;
0 commit comments