@@ -83,7 +83,7 @@ describe('default preset', () => {
8383
8484 expect ( client . transporter . requestsCache ) . not . toBe ( cache ) ;
8585 expect ( customClient . transporter . requestsCache ) . toBe ( cache ) ;
86- expect ( customClient . initRecommendation ( ) . transporter . requestsCache ) . not . toBe ( cache ) ;
86+ expect ( customClient . initPersonalization ( ) . transporter . requestsCache ) . not . toBe ( cache ) ;
8787 expect ( customClient . initAnalytics ( { requestsCache : cache } ) . transporter . requestsCache ) . toBe (
8888 cache
8989 ) ;
@@ -92,7 +92,7 @@ describe('default preset', () => {
9292 read : 46 ,
9393 write : 47 ,
9494 } ) ;
95- expect ( customClient . initRecommendation ( ) . transporter . timeouts ) . toEqual ( {
95+ expect ( customClient . initPersonalization ( ) . transporter . timeouts ) . toEqual ( {
9696 connect : testing . isBrowser ( ) ? 1 : 2 ,
9797 read : testing . isBrowser ( ) ? 2 : 5 ,
9898 write : 30 ,
@@ -110,7 +110,7 @@ describe('default preset', () => {
110110 expect ( customClient . transporter . hosts ) . toEqual ( [ createStatelessHost ( { url : 'foo.com' } ) ] ) ;
111111
112112 expect ( customClient . initAnalytics ( ) . transporter . queryParameters ) . toEqual ( { } ) ;
113- expect ( customClient . initRecommendation ( ) . transporter . headers ) . toEqual ( {
113+ expect ( customClient . initPersonalization ( ) . transporter . headers ) . toEqual ( {
114114 'content-type' : 'application/json' ,
115115 'x-algolia-application-id' : 'appId' ,
116116 'x-algolia-api-key' : 'apiKey' ,
@@ -119,31 +119,31 @@ describe('default preset', () => {
119119 createStatelessHost ( { url : 'foo.com' } ) ,
120120 ] ) ;
121121
122- expect ( customClient . initRecommendation ( ) . transporter . queryParameters ) . not . toEqual ( {
122+ expect ( customClient . initPersonalization ( ) . transporter . queryParameters ) . not . toEqual ( {
123123 queryParameter : 'bar' ,
124124 } ) ;
125125
126- expect ( customClient . initRecommendation ( ) . transporter . headers ) . toEqual ( {
126+ expect ( customClient . initPersonalization ( ) . transporter . headers ) . toEqual ( {
127127 'content-type' : 'application/json' ,
128128 'x-algolia-application-id' : 'appId' ,
129129 'x-algolia-api-key' : 'apiKey' ,
130130 } ) ;
131- expect ( customClient . initRecommendation ( ) . transporter . hosts ) . not . toEqual ( [
131+ expect ( customClient . initPersonalization ( ) . transporter . hosts ) . not . toEqual ( [
132132 createStatelessHost ( { url : 'foo.com' } ) ,
133133 ] ) ;
134134 } ) ;
135135
136136 test ( 'shared implementations between clients' , ( ) => {
137137 const analytics = client . initAnalytics ( ) ;
138- const recommendation = client . initRecommendation ( ) ;
138+ const personalization = client . initPersonalization ( ) ;
139139
140140 expect ( analytics . transporter ) . not . toBe ( client . transporter ) ;
141141 expect ( analytics . transporter . hostsCache ) . toBe ( client . transporter . hostsCache ) ;
142142 expect ( analytics . transporter . userAgent ) . toBe ( client . transporter . userAgent ) ;
143143
144- expect ( recommendation . transporter ) . not . toBe ( client . transporter ) ;
145- expect ( recommendation . transporter . hostsCache ) . toBe ( client . transporter . hostsCache ) ;
146- expect ( recommendation . transporter . userAgent ) . toBe ( client . transporter . userAgent ) ;
144+ expect ( personalization . transporter ) . not . toBe ( client . transporter ) ;
145+ expect ( personalization . transporter . hostsCache ) . toBe ( client . transporter . hostsCache ) ;
146+ expect ( personalization . transporter . userAgent ) . toBe ( client . transporter . userAgent ) ;
147147 } ) ;
148148
149149 test ( 'allows clients to override credentials' , ( ) => {
@@ -154,12 +154,12 @@ describe('default preset', () => {
154154 const analytics = clientWithOptions . initAnalytics ( {
155155 apiKey : 'analytics' ,
156156 } ) ;
157- const recommendation = clientWithOptions . initRecommendation ( {
158- apiKey : 'recommendation ' ,
157+ const personalization = clientWithOptions . initPersonalization ( {
158+ apiKey : 'personalization ' ,
159159 } ) ;
160160
161161 expect ( analytics . transporter . headers [ 'x-algolia-api-key' ] ) . toBe ( 'analytics' ) ;
162- expect ( recommendation . transporter . headers [ 'x-algolia-api-key' ] ) . toBe ( 'recommendation ' ) ;
162+ expect ( personalization . transporter . headers [ 'x-algolia-api-key' ] ) . toBe ( 'personalization ' ) ;
163163 } ) ;
164164
165165 test ( 'allows clients to keep default credentials' , ( ) => {
@@ -168,10 +168,10 @@ describe('default preset', () => {
168168 expect ( clientWithOptions . transporter . headers [ 'x-algolia-api-key' ] ) . toBe ( 'apiKey' ) ;
169169
170170 const analytics = clientWithOptions . initAnalytics ( ) ;
171- const recommendation = clientWithOptions . initRecommendation ( ) ;
171+ const personalization = clientWithOptions . initPersonalization ( ) ;
172172
173173 expect ( analytics . transporter . headers [ 'x-algolia-api-key' ] ) . toBe ( 'apiKey' ) ;
174- expect ( recommendation . transporter . headers [ 'x-algolia-api-key' ] ) . toBe ( 'apiKey' ) ;
174+ expect ( personalization . transporter . headers [ 'x-algolia-api-key' ] ) . toBe ( 'apiKey' ) ;
175175 } ) ;
176176
177177 it ( 'can be destroyed' , ( ) => {
0 commit comments